add additional error handling to spark.dart

Add some additional error handling in spark.dart, when deleting and renaming files.

@umop