Prevent exception switching to alt buffer before open()
Prevent exception switching to alt buffer before open()

Fixes #892

akalipetis/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,akalipetis/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js,akalipetis/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,akalipetis/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js