Under Windows 7 it is seems somehow necessary to close the first, before deleting the file. Else the following testEachObject() test fails with an access exception.