Create missing configured prefix folder

Fixes #3431

If you load npm programmatically and specify a non-existent directory, it will now create the directory.