Does the `mktemp do` block not work here, as you have done for fasttree? Then, we would not need the `require tmpdir`.
The `mktemp do` automatically generates a new private dir and `cd`s into it.