Correct directory parsing