pub fn writer<P>(&self, path: P, unique_value: &str)
                 -> io::Result<csv::Writer<Box<io::Write+'static>>>
        where P: AsRef<Path>
    {
        let filename = self.filename(unique_value);
        let full_path = path.as_ref().join(filename);
        if let Some(parent) = full_path.parent() {
            // We may be called concurrently, especially by parallel `xsv
            // split`, so be careful to avoid the `create_dir_all` race
            // condition.
            create_dir_all_threadsafe(parent)?;
        }
        let spath = Some(full_path.display().to_string());
        Config::new(&spath).writer()
    }
Create a new, writable file in directory `path` with a filename
using `unique_value` to replace the `"{}"` in the template.  Note
that we do not output headers; the caller must do that if
desired.
src/util.rs