get recursively all the contents under a directory

Added support for recursive=true when getting key value to get the whole
tree.