Fix trap so it works under simple /bin/sh.