cleanup read/write tree api
Merge branch 'rasmus-master' into yjw-libs

Conflicts:
	rasmus/treelib.py