Fixed getDirRec function.
Made getDir return a representation of the root path.