(PUP-3678) skip non-directories on the module path

This avoids pointless warnings about invalid modules that started with puppetlabs/puppet#3261.
I'm confused by the `module` attribute's doc comment.  It states that `if multiple modules with the same name are present they will both be added, but methods like {#module} and {#module_by_forge_name} will return the first matching entry in this list.`

However, the block clearly only adds a module for the first name encountered (e.g. `seen_modules[name] = true`).  Besides the call to `warn_about_mistaken_path`, how does this code differ from `modules_by_path` (ignoring the terrible `chdir` call) other than returning an array of modules rather than a hash?  Seems like we could refactor this.