Fix building in directory without package.json.
Fix target path for projects that are not in the CWD.