Currently, when right-clicking a file in KDirOperator, the "Create New" menu is available and can be used. However, when creating any new directory or file, the operation fails since we're trying to create a directory or file under a file.
This patch modifies KDirOperator to only enable the "Create New" menu when the selected item is a directory.