pub fn create_and_canonicalize_directories( directories: impl IntoIterator<Item = impl AsRef<Path>>, ) -> Result<Vec<PathBuf>>
Creates directories if they do not exist, and canonicalizes the paths.