timeout for command execution
fixes #429
fixes #487
Merge pull request #705 from vladak/timeout

timeout for command execution