Refactor shutdown handler to catch exit/die and send apropriate headers
Merge pull request #98 from wagnert/master

Refactor shutdown handler to catch exit/die and send apropriate headers