For --mozilla, observe the 'quit-application' event ('xpcom-shutdown' seems to occur twice the first time the browser is run).