guard against DoS - thanks @epitron.

Timeout doesn't interupt this code:
x = " "*(2**31)

I reported an issue to the ruby bug tracker, but for now we just let the
subprocess run for a second, and forcefully kill it immediately afterwards.