create directory on write