Fix broken tests.
Add git hook to run tests pre-commit.