accounting for the possibility that the myfileobj is None
pulled is_closed logic into a function so it can be used in one other place
removing unused import
Merge pull request #494 from pulp/mhrivnak-fix-gzip-inspection

further fixed to py2.6 gzip inspection