Fix closing temporary files.

output_file descriptor was never closed.