Fix broken unit test for tree.py
Fix broken tree test generation
Removed perms test which is not for inclusion here