added setLastrun method, better use of ctor/dtor

 - all file writing in dtor
 - all file creation and assignment of default values done in ctor
 - added setLastrun method, which takes a datetime object
 - simplified setLastrun method
 - commented/added docstrings