Asynchronously convert directory tree structure into a javascript object.