handle failed commands, return actual exit code. fixes #4