xPath-like UNL's 2nd version

This contains the updated version. Here is a sample tree converted into UNL's:

a:0
a:0-->b:0
a:0-->b:0-->e:0
a:0-->b:0-->e:1,1
a:0-->b:0-->e:1,1-->a:0
a:0-->b:0-->f:2
a:0-->b:0-->f:2-->a:0
a:0-->b:0-->f:2-->a:0-->1:0
a:0-->b:0-->f:2-->a:0-->1:0-->x:0
a:0-->b:0-->f:2-->a:0-->2:1
a:0-->c:1
a:0-->d:2
a:0-->f:3

The code is ok and working on my computer, but please review the code before pulling.
Thank you.