Additional input checks and a test for b \cong 0 (mod a) in test_mp_sqrtmod_prime to go along with it.