format dir path