Checking shell script termination behaviour.