I got the test to fail

The `ensureDirectory` function was raising an exception when the
directory already existed, and the `onException` function didn't do what
I wanted.

Introduce an `orException :: IO a -> IO a -> IO a`. Run the first IO; if
it succeeds, produce that; otherwise, produce the second IO.