clean up revamped implementation of download_file

cleanup for https://github.com/hpcugent/easybuild-framework/pull/1066
I've added a warning log message.

I feel we should just make it try again in case we failed to get the HTTP response code?