Patch for task T2180. The string passed to the new directory window is complete if we are on a directory, and stripped by the extension on files.
The text is always selected; a user that wants the old behaviour (no text at all) starts typing what he wants; if we are on a directory and we press enter without changing the text, the window error appears (instead of a null action for an empty string).