Smarter dirtree checking.