Improve download utils
Created by: Zaharid
Download always in the same directory, to avoid problems where /tmp is mounted on a slow, hard to reach, file system.
Also avoid partial downloads by first downloading to a temporary file name and then moving it to a final location. In this way if the download fails, the user doesn't get the corrupt file in the final location.
Closes #10 (closed).