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

Fixes #2560 

Either change this to:
```dart
       if (childNames.contains(newName)) {
```
Or change the container above to:
```dart
      Iterable<Resource> children = resource.parent.getChildren();
```
and the condition to:
```dart
     if (children.any((Resource resource) => resource.name == newName))
```