Added validity checks to testSGP(3)
Validity check fix from previous commit
Merge pull request #465 from dbetebenner/master

Modification/refinements of testSGP(3)