Replace panic() with proper error handling.

Experiment with using raw .go file and go run them. It would be particularly
useful for experimenting at a slightly startup perf cost. I think it's still a
good trade off; as executable would still be supported for the normal use case
and raw .go files for experimentation.