Fixed bug in tree diff that caused sibling relationships to be lost, added four more builtin string functions:
index_of(), contains(), length() and substring().