Modernize code a bit; and use a temporary dir for the working set. Typically, this makes the tests run faster (since the temporary dir is often in-memory), which allows focusing on the part we can most easily influence.