The main gitshed functionality.

Pulls together code from previous commits.

The main() wrapper, BUILD files etc. will follow shortly.
I think we should check that this doesn't exist before we do the shutil.move. If it did exist for some reason we might move the file and then fail to create the symlink