fixed master and client code for create directory