Fix a bug causing element having text node child to be considered as
leaf node. Only elements having no children elements should be leaf
nodes.
Change ivy lib path to local.