Fix encoding/extension of gzipped files when gzippedOnly is not set