Check module directory existence.
Retrieve the module list from .gitmodules.

'git submodule foreach' is too slow since it calls 'git ls-files'
internally.