speed up reading and writing of gzipped files by spawning a subprocess