refactor(mkdir utils): split functions