Added a function to do CFPreferencesAppSynchronize for each modified domain. Also ask for confirmation before restarting apps.