Fix async incorrect main

sync resolve already found `index.js` if `"main"` field in `package.json` was incorrectly specified (same way that nodejs does).
This fix makes async resolve behave the same way.

If the white space changes are a problem let me know. -- my vim is set up to remove unnecessary white space on save (I forgot about that).