Reduce OS dependecies

As I'd like to use your tool on Windows, I fixed some stuff that is troublesome there:
- Use generic temporary directory
- Use PHP's own gzip handler to not rely on installed gzip binary (PHP on windows comes with default support for gzip)