Whitespace changes
Fixed script execution to always use the frontmost window, instead of window 1.

If you had multiple terminal windows open, there was a chance that the command was sent to another window (the one with index 1). Using index 0 will execute it in the currently visible window.