Updated patch, with full cutover to Files.delete() (and File.delete() banned in forbidden apis).
This forced me to review all code deleting files, and I had to plug some leaks in suggesters, hunspell, offline sorter.
Additionally to prevent such leaks, i had to add some IOUtils methods like deleteFilesIgnoringExceptions and so on.
I moved TestUtil.rm to IOUtils, and fixed its exception messaging to return the actual exception messages for each file it couldnt delete. This is now used several places in source too (that had their own duplicate "rm" methods).
I think we should do this as a step, because deleting files is about the most dangerous thing our code can do. So we really need real exceptions here in case something goes bad.
Later we should investigate what Uwe suggests (Path api). This would be good to look at for lucene 5, but this patch is heavy enough.