Added property for root and current directory entry.
Added getDir() function.
type check.