3609: fix "NameError: name 'rcode' is not defined"

If run-command raises an exception in the main 'try' loop before any
subprocesses have run, rcode will not be defined and "not any([status !=
0 for status in rcode.values()])" will raise a confusing "NameError:
name 'rcode' is not defined" exception.

Solution is to define rcode before the try/except block and to make sure
'success' is False if rcode is completely empty.
Merge branch '3609-run-command-bugfix'

Refs #3609.