merge get and list operation

Get will return an array of items under a key if the key is a directory.