added some more caching to the getFolderId function.  Now stores the Id of each directory in the path as a cookie to make subsequent look up faster.