Fixed upward relative directory and short path logic for generating rooted path strings.