Add unit test for cli and util

Because mock and stub is not easy for go, cli and dir test is still
missing