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

Fixes #2560 

I've just checked: we're very inconsistent about the case of the error dialog's title in `spark.dart`. Sometimes "It's Capitalized Case", other times "It's sentence case". Let's land this as is, and ask @cleercode and @lukechurch: what do you think?