Adding proper proxy support

now checkout can be done with out having to use the environment proxy
variable.
Needed, otherwise git breaks...
more for proxy support

Also moved code around so there is less waist.
description
compacting connection
Merge pull request #25 from rudiheinen/master

Proxy support