fix mkdir tmpdir