Fix handling of submodules

For the non-trivial reason that 'git ls-files' returns these pathnames,
which are actually directories. Currently I don't plan to make the
search replace recursive into those submodules repositories.