fixing src dir crash, package.json main support

...on node_modules/.bin/src
and adding support for main defined in package.json with or without src dir