Updated compiler script.

Updated the compiler script to run the compiler on demand because the
file watcher is slow and catching errors is hard. The script now shows
dialogs to indicate progress, as well as opening error output if
something goes wrong during compliation.
Fixed button press logic.

Commands were not running on button press due to setup race condition.
The new code uses the ready callback to remove this issue. Not quite
what I had in mind, but now you implement the click method and trigger
fire instead.