pub fn write_to_disk(cookie: &Cookie, dir: &Path) -> Result<()>
Writes the given cookie to the given dir.