Added some tests.
Version number is not increased when nithing is saved during session. Tried to fix loading and removing files during and upon startup.
Fixed some mistakes reported by pychecker.