Fixing bug in isPrime() funciton.
Making test function for isPrime more thourough.