GetDirectoryBase method