extract_trees(): Fix extraction of multiple paths to stdout