Refactoring check

This PR refactors `tools/check.py` so that error messages are logged for later retrieval rather than being displayed to `sys.stderr` immediately. This change allows us to use the script as-is in [https://github.com/swcarpentry/amy](Amy) for validating workshop home pages.  See [PR 111](https://github.com/swcarpentry/amy/pull/111) against Amy.