Updating to work for subprojects

Will use root project git repo in case of being a subproject

Potential improvement would be to look for nearest .git directory