Add setsignals and call it for shell and run only

The signals must not get setup in __init__ when envdir is used via the
Python API.

Fixes #21