Fix logic for detecting gzipped filed in download.py