Make the pagemod conditional on having a non-empty affectedSites.
Open file:// links in an external application when network.protocol-handler.expose.file is false.
Check in the XPI.