Only remove data dir when `use-temp-dir?` is `true`.
Fix bug.