Support for python 2.6

It's still popular https://gist.github.com/dstufft/10630936,
backporting GzipFile's enter and exit
BytesIO fits all testcases, StringIO is unneeded.
Update tests
Merge pull request #8 from nicorevin/update_tests

Update tests, backport GzipFile for 2.6