Closing the file handle after download

as agreed in http://curl.haxx.se/mail/lib-2014-10/0085.html