refactor use keyToPath to generate path for the key
feat(dir) add dir releated functions
Merge pull request #62 from xiangli-cmu/add_dir_func

Add dir func