add .tree_selected css class to the selected node

this css class only works when span tag is inside the node.

for that reason, i also got to tweak buildNode to add always span tag inside node