Added more validations during rename file/folder.
The rename dialog shows file or folder according to the item selected.