Only attempt rewriting https or http URLs.

Fixes #330, exception processing about:newtab.