Add basic http auth

Hi

Implemented basic authentication for ``/api/1/upload``

Envenvironment variables:
PERM_USER
PERM_PASS

Example:
``http://username:password.{{your-hostname}}.com/api/1``

I'm not a Python-guy, sorry if my code is a bit messed. :) - Not tested with valid AWS/Azure credentials.

-Norman