Prefer File.delete over File.deleteOnExit

The former has deterministic behavior and avoids resource leaks.