Fixing issue with node order

Was previously casting the position to an int.  This caused null to get cast to
0 and made the node order backwards.

Signed-off-by: Nate Brunette <n@tebru.net>
Adding test case for get tree

Adding test for previous edit to Tree::getTree().

Signed-off-by: Nate Brunette <n@tebru.net>