Fix some timeout issues and other issues with the sagecell-client example.

Thanks to sdenton4 on github for pointing out the timeout problems (see gh-401)