Canonicalize dir name.