Signal handler is uninstalled after getting a signal to avoid recursion

This is actually a patch to work around issue #8