Handle both .gz and .gzip archives