Add a check on download url

Reject illegal url(s).