bug 983322 - sanitize preferences-branch
Merge pull request #1664 from zombie/983322-sane-prefsBranch

bug 983322 - sanitize preferencesBranch, r=@erikvold, @ZER0