fixed creation of dirs