Use a temp file when gzipping to avoid orphaned .gz files.
Merge pull request #63 from pifantastic/issue-58

#58 - Use a temp file when gzipping to avoid orphaned .gz files