Fix for #7220: empty pref file is an empty object, not an error.

This also fixes #7229 which was duped to #7220.
Fix the regex based on review comment.
Merge pull request #7263 from adobe/dangoor/7220-empty-prefs

Empty pref file is an empty object, not an error.