Also look in DRUPAL_ROOT.'/.git/modules' for submodule .git dir

Add on to e3c24ae

.git in the submodule dir might not be a dir and instead might be a file containing a gitdir path to the location of the submodule's .git dir