Fix crash in download_entry()

download_entry() would crash when getting a file with no content-type
eg http://www.speedtest.qsc.de/1kB.qsc from the tests. Now defaults
to unknown/unknown
Implement TODO in download_entry() - filename from URL

If the end of download_entry() is reached and no filename is set,
get one from the URL.
Requested tweaks
Merge pull request #134 from theaquamarine/download

Download patches