generates directory indexes, automatically, with memoization, for Nodejs