pub fn encode_cwd_for_dir(cwd: &Path) -> String
Encode a working directory path into a safe directory name. Mirrors pi’s encoding: strip leading /, replace / \ : with -, wrap in –…–