branch_tree: remove unused ->repo references

It's unused by the branch_tree callbacks, and if it were used, we
could get to it via ->object.
test: use mktemp -d instead of mktemp --tmpdir --directory

It would seem --tmpdir and --directory aren't available on RHEL5.

Go figure..