Fix display of unstaged directories.
requested to merge verner/kdevelop:fix/directories-have-wrong-labels-in-changes-treeview into master
Previously, unstaged directories would be shown without the directory name. This commit fixes the bug by removing the trailing slash from the directory path before feeding it into prettyFileName. The root cause is that QUrl::fileName returns an empty string for paths with a trailing slash.