address a few analysis warnings

Address a few analysis warnings:
- some new dead code warnings in the git code
- some warnings due to clients using `getOrCreateFile` on `Container`s, but that method only being available on `Folder`s. Moved an abstract definition up to to Container; kept the concrete impl on Folder.

@ussuri