argparse
This implements some unit tests for the new `argparse` command and fixes a couple of bugs those tests brought to light. Fixes #4190