tmpdir test fixes