The main gitshed functionality.

Pulls together code from previous commits.

The main() wrapper, BUILD files etc. will follow shortly.
Hmmm, I'm of two minds here. 

1) shutil.move will stomp target_abspath if it exists, at least on platforms we care about. and I think that's the right behavior. The target is inside the git shed dir, so users shouldn't have to deal with issues in there. And target_abspath might exist because, say, you ctrl-c'd between the move and the symlinking, and now you're retrying.

2) On the other hand, I suppose target_abspath might exist because of an introduced bug that gets paths wrong, so it might point to some unrelated file, and stomping it will cause imagepocalypse II somehow...

OK, let's err on the side of caution. Added a check for this. I can't do it in the exception raising part because I don't have the path there (I need the content's key in order to construct the path).