Track batch id in the application configuration file and make sure events are reset.

Make dir naming more consistent.
Add support for changing configuration settings on-the-fly.