Fix function find_package_directory(), check_deps() and modify_deps()