Fix plugin api
Add before/after hooks
Merge pull request #62 from segmentio/plugins

Fix plugin api