Followup to bug 151407: use GetDir() on the root element. r=bz