What's the point of trying to load `path` and not `path.js` right away ? In that case you will
not even need to check if it is directory.