refactor(cloudfunc) rmLastSlash