make Lib class work with git submodules

for git submodules .git is not a directory but a file containing the location of the real .git dir.

the above patch resolves @git_dir to this real .git dir location if .git is a file.