Added gzip support

TPB started using gzip compression of the returned html, which must be
handled correctly for the script to work.