Even simpler/better subprocess code, which works with timeouts again.