Clean up timeout setting code

 * clean up timeout setting code
 * fix the unit tests
Merge pull request #43 from Wikia/fix-s3-build

Clean up timeout setting code