Fixed git file handling bugs.