make template fetch timeout configurable and handle failure

Fixes #221

This doesn't address possible timeouts via the UI.  But I'm not sure if we've had problems there.