Better err msgs for cmd line flags with missing arguments

Partially addresses #9075.