Fix broken gz files

there were quite some errors in handling of specs.4.8 and specs.4.8.gz, latest_specs.4.8 and latest_specs.4.8.gz, etc files.

somehow one error did show up in the tests, which actually means some better is needed. after fixing the first other errors popped and got fixed as well.