fix ktest to use JCommander

The last of the refactorings to remove Apache Commons CLI.

@osa1 please review.
I'm a bit confused about underscores. We both have `_directory` and `directory` but as far as I can see `_directory` is never assigned.