Specify Accept-Encoding to make sure a raw file content is downloaded.

When a response header has a Content-Encoding header Net::HTTP
automatically decodes the content unless Accept-Encoding is explicitly
given, and some problematic server like zlib.net wrongly adds a header
"Content-Encoding: gzip" along with "Content-Type: x-gzip" for gzip'd
tar files (*.tar.gz).  This combination leads to an unfortunate result
that the saved content of a downloaded gzip'd tarball is already
gunzip'd and the following extraction thus fails.