Added handle Interupt and SIGTERM and added wait for process to finish a...

...fter we've killed it

Possible solution for issue #29