cmd/run: Fix cmd wait

It was supposed to check cmd insetad of err to decide to wait for the
cmd or not.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Merge pull request #36 from asias/fix

cmd/run: Fix cmd wait