Prefer using the temp file instead of reopening

The temp file can be used directly without having to reopen it by simply
calling Seek() to set the file pointer back to the beginning of the
file.
Merge pull request #72 from Dparker1990/use-temp-file

Prefer using the temp file instead of reopening