Added a testing framework
Added some initial tests of git functionality and fixed bugs.