Added ConfigManager to preserve some values (project_dir etc). Fixes #22...

...1