mock gzip file input/output stream for tests
changes Pawel suggested