pub fn write_report(report: &Report, path: &Path) -> Result<()>
Serialize the report and write it next to a trailing newline.