Add importing/exporting of filters.
Close #942.