bug fixes

fixed a bug when saving files and a bug when computing the reduced
chi^2 in the Keplerian FAP analysis