Removed call to xrange (xrange is not in py3k).
GzipFile in python3 expects a byte-based IO buffer, not a str-based buffer.  
IO is an alias to io.BytesIO under python3, StringIO under python2.
Merge pull request #2 from pj3090/py3k

Python 3 compatibility