Allow npm to install to a directory that doesn't yet exist

If path is specified but does not exist, create it.
Fail if path is specified but is not a directory