GZip write

If the extension of the given file to save is .gz, saves it according to it