fixed path to package.json

When execute from another directory, the `package.json` cannot be found since its relative to the script. I fixed it by prefixing it with __dirname.