Fix dir parsing.