Be more careful when trying to find extra files during cleanup.  This method is a slower (0.6s vs 0.5s using sets, cleaning a dataset with ~3000 files) but it should be more robust dealing with directories with large numbers of files.