added function that closes nerdtree when it is the last buffer window open.