Added a powerful Check.execute function.

This can capture the result value, new environment,
standard output and error, and possible exceptions.