fix applescript error

fix applescript error when Terminal is runing and window count is 0
https://github.com/afterdesign/MacTerminal/issues/24