Improve project directory determination
When using "New from Folder", open the directory selection dialog at
current document's directory to simplify new project creation for
opened files. Fall back to "project files" directory if no file opened
and if this directory isn't set in preferences, fall back to user's
home directory.
In addition take into account that the "project files" directory may not
be set when filling in entries in the "New Project" dialog and fall back
to currently opened document's directory or to home directory when no
document is opened.