Fixes bugs and adds tests for the GitFileTree.