Sanitize output filename when saving from content filter toadlet.
Fix bugs in default file extension lookup.