how about just `state.tempDir = writeableDir(os.tmpDir) ||` that way we know the dir is writeable and we don't have to test for the presence of `os.tmpDir`