Add cpl_errs context manager.

Closes #108.