Make sure our command line calls always exit
Make sure our command line calls always exit

sarge's "wait_events" is unreliable. If an asynchronous
job is started but stops immediately and raises a sarge
Exception (inside the async thread), the associated
command's event will never be set event though the
process finished. So we'd wait indefinitely here.

We circumvent this by first waiting until the commands
are parsed and processed (p.commands contains
elements), then until said commands are started and then
making sure the command's process is actually set. Only
then do we actually have a background process running
that we'll be able to monitor further down, otherwise
the command immediately failed.

beeverycreative/BEEweb,foosel/OctoPrint,JackGavin13/octoprint-test-not-finished,MoonshineSG/OctoPrint,bicephale/OctoPrint,JackGavin13/octoprint-test-not-finished,MoonshineSG/OctoPrint,Salandora/OctoPrint,Jaesin/OctoPrint,MoonshineSG/OctoPrint,beeverycreative/BEEweb,foosel/OctoPrint,bicephale/OctoPrint,bicephale/OctoPrint,foosel/OctoPrint,Jaesin/OctoPrint,beeverycreative/BEEweb,beeverycreative/BEEweb,JackGavin13/octoprint-test-not-finished,Jaesin/OctoPrint,MoonshineSG/OctoPrint,Jaesin/OctoPrint,Salandora/OctoPrint,bicephale/OctoPrint,JackGavin13/octoprint-test-not-finished,Salandora/OctoPrint,Salandora/OctoPrint,foosel/OctoPrint