Added type() method to determine type of Directory (e.g. eDirectory)