Added support to drop the path suffix from getPath requests, so ->getPath("root") is equivalent to ->getPath("rootpath")
move the check before the exception