[RM-12171] Make pkg --install and --remove mutually exclusive
The code could not handle both being present, so make sure that we
don't allow that on the CLI.
Add unit tests for pkg.
Remove nargs=?. Using '?' doesn't make any sense unless a default
or const flag is also provided, which they aren't. We want to make
sure there is one string provided, which is the default behavior.