Remove use of gzip.open and tarfile.open context manager to make this work on Python 2.6