Fix misplaced parens in cmd.run

From log.warning('snip').format(shell) to
log.warning('snip'.format(shell)).

Also broke up very long line which probably contributed to this being hard
to spot.
Merge pull request #12530 from thusoy/cmd.run-fix

Fix misplaced parens in cmd.run