Ensure that the baseDir for createNewItem is within the project.

This is a fix for #9910.
Merge pull request #10072 from adobe/dangoor/9910-project-tree-root-dir

Ensure that the baseDir for createNewItem is within the project.