Fix CLI issues
- Handle scenarios when base path ends in `/`
- Fix CLI tests cases so that the test APIs are entirely deleted
2 files changed