fixed initialization bug with fouyr images not iterating properly. Also
solved issue of study.cfg being save in wrong directory.