Let getopt() handle argv error output
Skip PID argv parsing if PID not relevant

Don't check for PID if argv parsing for option results in errors or
another action besides the A_DEFAULT is specified.