Fix getPath() by also normalizing $root