TimeoutErrors should cause retries.

This contains the fix for #251 and a very very broken test. Submitted for your perusal and to prevent my head exploding.