Fix applying command line to keyword only args

Correct typo in applying command line arguments to keyword only options.
Add unittest to test this line of code.