fix tmpdir issues on mac