require('./foo/') should not try to load './foo.js'. It should only look for ./foo/index.js Closes GH-588