Enforced saving of UserPreferences when options dialog is closed.