Merge of gzip_memory bugfix
Replace system calls with Python functions; update tests
Merge pull request #21 from iainrb/devel

Replace system calls and update tests