Remove illegal chars from dirnames