refs #124; fixes some redirection problems when downloading packages.
refs #124; added retry-limit to prevent endless redirections & typo
refs #124; handle all HTTP 3XX redirect types
refs #124; fix for broken response-code check
refs #124; restricted redirects to 301, 302, 303 and 307.
Merge pull request #126 from addiks/bugfix/123

refs #124; fixes some redirection problems when downloading packages.