Added directory chooser to settingsdialog and respective logic to handle the preferences file; halfway done #5