fix applescript error

fix applescript error when Terminal is runing and window count is 0
https://github.com/afterdesign/MacTerminal/issues/24
Merge pull request #25 from lx1988cyk/patch-1

fix applescript error