Roots gitfs testing

There's some cleanup to do in here but the basic functionality is under test now. Discovered a few bugs along the way which are filed as well.