Fix for checking submodules location

Closes gh-3257