write_to_packages_file: fixing write to Packages.gz
TRIVIAL trivial fixes