Randomize exceptions when file is deleted while still open.

This somehow emulates a behavior on windows but we should test the
other code paths as well.