Fixes an issue with an infinite loop when deleting inexistent files.