Ensure that the baseDir for createNewItem is within the project.

This is a fix for #9910.
This should return right away.