Proper transaction handling in case of failure or in case of renaming a folder to the same name.