pub fn ensure_memory_dir() -> Option<PathBuf>
Returns the user-level memory directory, creating it if needed.