Support custom npm root

This allows you to change the root directory used by npm. This allows you to put `node_modules` somewhere other than in your project root. E.g. in `resources` or `target`.