Fixed tree.root(newRoot) bug

tree.root(newRoot) now also works for binary trees. Fixed a bug which caused an error for the layout function when changing the root node.