Provide better error message on missing commands

Before running a command in the sandbox, check its existence and fail
early if it does not.

This fixes issue #289.
6 files changed