Dirname to dir