Moved auto-detection of wget/curl into auto_detect.

* Have auto_detect() define the download() function.