Adding support for gzipped content.

Add the option to prefer gzip content and detects whether a file has been
gzipped. Set the Content-Type and Content-Encoding headers accordingly.

Addresses #3 .