Trim whitespace around script

There is currently a lot of whitespace in the Output panel when executing a script.