[bug[ Check for already existing files and folder before rename.

Fixes #2560 

In case the parent is `null`, it is a top-level rename, and we should allow it.