added test for count_leaf_nodes. moved Makefile from ref/ to parent