minor tweaks in download_file function

hmm, yeah, thanks...

I was trying to avoid removing a file that exists before `download_file` was called. Will fix.