Resolves the root directory of a local git repository, i.e. the dir that contains .git.