First fixes for downloading issues.

If an HTTPS URL redirects to an image which is on HTTP, the HttpURLConnection class does not follow the redirects (by design). We must take this into account!