fix test cleanup

this could leave garbage after it as the test file is removed in
flush (the fd could still be opened)