Add check for valid primes.

You should probably have this check just so that you don't accidentally waste time getting bogus results.

Also, I've added a new target for make. If you run

    make clean

it will delete what the make file has made. It's not particularly useful in this instance, since there's only one executable and no object files, but it's standard and makes me feel better.