Protect against A==0 or B==0 (mod N), or other non-group-elements. Closes #6.
Merge pull request #11 from warner/check-AB

Check for A==0 / B==0.