main: Handle SIGINT properly.

As explained by http://www.cons.org/cracauer/sigint.html

Signed-off-by: Fedor Indutny <fedor@indutny.com>