check for git repo before checking for submodules

fixes #222
Merge pull request #223 from ros-infrastructure/issue_222

check for git repo before checking for submodules