Replace bash mkdir by directory resource