Add a callback function so that -k can take a variable number of
arguments.  Fixes #5228
do not exec file if none of the kw is/are present

Also, in case None is the value for kw, make it a tuple
Merge pull request #1 from smichr/optparse

do not even exec file if the kw is not present
Merge pull request #8087 from pbrady/optparse

Allow -k to take a variable number of arguments