Set tmp directory as well as cache for specific module installs

For some modules (newrelic, for example), the NPM tmp directory is required, which is not writable by default.