Improve the session save and restore, close NERDTree and do shellescape to avoid space filename