Add checks for Errors to propagate signals

Fixes #26.  Add calls to PyErr_Occurred to ensure to that exceptions raised by signals are caught.  For some reason, merely checking the return value of calls to Python is not enough.  This should be optimized later.