Add save as support for Firefox.

Changes on our side needed for https://bugzilla.mozilla.org/show_bug.cgi?id=738952

If you want to test you'll have to apply the patch in that bug.