[script] reset the exit trap in the handler so that it is not called twice

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>