Added vim undo files to .gitignore.
Several improvements for generate_events.sh.

generate_events.sh:
- Parameters for used paths (see usage, -h);
- Verbose mode;
- Code improvements.