Print out errors if happens during compile

If piqic-erlang-rpc fails, error is not reported and script silently
dies.

This is copied from `piqic_erlang:main/1`. You may want to abstract the code there, I don't know. Any way, please make sure the script does not silently die.