only add expand/collapse class if the tree node has children - otherwise add the leaf class

I'd be happy to continue helping with development on this product as I think it is extremely valuable. Let me know what else I can do other than submitting more pull requests.