Whitelisting bug fixed

Fixed a bug where the whitelist was getting mangled whenever the browser
was reset.  Also using re.escape instead of just replacing dots with slash-dots.
Merge branch 'master' into qt5