add .js extension, use require.resolve
Merge pull request #1 from iojs/tweaks

add .js extension, use require.resolve