Improve error handling of PaperScripts on Firefox.