pub fn build_file_tree(files: &[DirEntry], base_path: &Path) -> FileTree
Builds a nested BTreeMap representing the file structure.