refactor(cloudfunc) getDirPath
feature(commander) getDirPath -> addSlashToEnd