Make sure that event handlers pass through environment variables.
Merge pull request #144 from mcroydon/event-handler-environment

agent: Make sure that event handlers pass through environment variables.