Treat projects in subfolders correctly in `NewFileWizard`

Normally a project is located in the root of the workspace, which would
lead to a physical location like '/workspace/project/file'. But it is
totally valid to have a file in a physical location like
'/worskpace/subfolder/project/file'. In this case the wizard did not
work correctly.

Fixes #1002185
Why not use workspace operations? Avoid going to the underlying file-system, it's a can of worms. (see earlier comments)