make automated tests for anaylsis and atlas generation

This commit contain two things
1) the automated test scripts for analysing lightcurves with known results
   inlc. the data file of the simulated lightcurves
2) small bugfixes for bigs discovered in the process