Ensures that the nerdtree window will be closed after the last buffer
was closed.