Corrects OSX issue: "Terminal got an error: Can’t get window 1"

It seems “set frontmost to true” was the culprit here. Adding a dummy script call fixes this issue for me in Yosemite, but should probably be tested on older versions.