[data] Improve file name handling and removal in CachedDataSink

This ensures that all files are tentatively removed.
4 jobs for data_improve_file_handling in 4 minutes and 30 seconds (queued for 7 seconds)
Status Job ID Name Coverage
  Build
passed #191897
docker
build_linux_36

00:02:49

73.0%
passed #191898
docker
build_linux_37

00:02:46

73.0%
passed #191895
macosx
build_macosx_36

00:04:30

73.0%
passed #191896
macosx
build_macosx_37

00:02:34

73.0%