Let check return nonzero exit status on failure (fixes #198)