modified mkdir to use recursive option