Making signal handling ruby 2 compatible

by stealing the pattern used in Sidekiq :scream_cat:.

Fixes #263