Fix git hooks

Also reworked how git hooks are installed to be more maintainable (based off [this post](http://johnkpaul.com/blog/2013/10/04/git-precommit-hook-awesomeness/)).

Only thing this one doesn't do is delete old hooks, but I think that's fine.