Scripting API: add Node.getPathToRoot()