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
This currently throws NPE for a linked resource (I guess it didn't work before either, most likely). I think you can easily test this in your setup, if you have the scalac and scala-reflect projects. They make extensive use of linked resources for source folders.