fn save_retries(path: &PathBuf, tasks: &[FileTask])
Persist current list of failed items to retries cache.