Added check on flux error > 0 and call to badCurve in Supernova class.
Added check on bad curve before fitting in test code.