Very simple config file loading

I added support for a config file to your script. Having credentials in environment variables makes me uneasy. 

I've used a very quick and dirty version of XDG config standards - see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables

I'm not sure if you were trying to make this *sh compatible but if you need me to I can rewrite the variable substitution on line 8 without a bash-ism.