Fix closing temporary files.

output_file descriptor was never closed.
"Merge pull request #320 from pazur/patch-1\n\nFix closing temporary files."