Fix: create $HOME/.npm since it's sometimes not writable
Enhancement: please the @fh :>
Fix: add tmp as well

 * refactor code to allow arbitrary directories for npm
Merge pull request #332 from till/fix/www-data_for_npm

Fix: create $HOME/.npm since it's sometimes not writable