Fixed error in normpdf calculation.  Added tests.