Follow redirects when downloading a file.
Updated tests