pub fn keep_rules(path: &Path, rules: &[Rule])
Write the rules when they changed, through a temporary file so a gate reading at the same time sees the old rules or the new, never half.