Async tree traversal for nodejs