Use IOChannel approach in order to make signal handling synchronous

- closes #17

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Signed-off-by: Michal Toman <mtoman@redhat.com>