Get rid of annoying cf-key errors during testing.

They happen because the key does not exist in the workdir, so let's
create it as part of setting up the temporary workdir. This means we
also don't have to set it up in the tests that *do* require a key.