The main gitshed functionality.

Pulls together code from previous commits.

The main() wrapper, BUILD files etc. will follow shortly.
value error is also a generic exception and probably shouldn't wrap such a large block of code. Just the loading should be in the try block