changed opendir the open dir shold be performend(aka we sholud return 0) when the name matches and the type is a dir