Added makedir method.