use cwd() instead of directory of index.js to identify package.json