Die gracefully

Properly handle a SIGTERM or a child dying, kill all child processes and die gracefully (hopefully solves #34).

I'm currently opening this pull request mostly to get some feedback rather than to have it quickly merged.

(The diff on main.py isn't very useful due to the changes in indentation. A [git diff -b](https://gist.github.com/dimrozakis/9872263) seems more helpful.)