Allow `tree.cleanup` to return a promise.