Fix result of is_prime(p^2) for p a prime.

Previously is_prime(9), is_prime(16), is_prime(25) all returned true.
Merge pull request #1 from bfroehle/patch-1

Fix result of is_prime(p^2) for p a prime.