Support looking up index.js or index.css for require directives that point to a directory.