New DownloadSingle function, with error checking and documentation

As discussed on the mailing list, I introduce a new DownloadSingle utility function. This represents best practices for file downloads:

* If the download fails, no zero-length file gets created
* If the download fails, an error is triggered and the script exits
* The function uses stream copy for minimum memory overhead.