Add Gzip support to output files.

This adds gzip support to the output file generated. This is necessary
since the files can get huge otherwise. Specifically this reduces a 25MB
file into a 900k file for a related test I wrote.