Refactor CLI test dir