Close the input FILE * in read_file() and the output FILE * in write_file()
if read_stream() or write_stream() fails to avoid leaking the FILE.
Reported by:	Coverity
CID:		977702
Reviewed by:	pfg
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6554