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.