fix python gzip method under python 2.6

Sorry my previous code was broken under python 2.6, because gzip.open do not have method __exit__, which called indefault by with statement. If you accept thi pull requset, please update code in pypi.