Add downloader script

* detects non-archives and deletes them (e.g. HTML error pages etc)
* retries failed downloads several times
* canonicalise github.com URLs

The github.com URLs we're using are of the form

  https://github.com/org/project/archive/tag/filename-we-want.ext

unfortunately these URLs don't always work, so we rewrite them to
the standard URL of the form

  https://github.com/org/project/archive/tag.ext

Signed-off-by: David Scott <dave.scott@citrix.com>