clean up revamped implementation of download_file

cleanup for https://github.com/hpcugent/easybuild-framework/pull/1066
This is not handeling this error correctly.