Save the search filter to a disk file.
Returns 0 if the file was created successfully, or non-zero if an error occurred.