This patch replaces the path.exists check for module loading with a call to fs.statSync (or fs.stat for require.async) which ensures that it's not trying to load a directory.