Fix getPath() by also normalizing $root

Partial fix #122