determine dependencies to exclude from generated module file using recursive ModulesTool method path_to_top_of_module_tree
add unit test for path_to_top_of_module_tree + factor out common code to test utilities module