Bug 864399 - Save the pref file after each localID. r=fabrice, a=tef+