Emits error event when plugin compile fails.

- Plugins now emit an error event when they fail to compile.
- Bumped version to v0.3.1.