Fix for missing .npm file

Should use the -p flag of mkdir as well, as just mkdir fails if directory exists