Let check return nonzero exit status on failure

This fixes #198.