Added timeout recovery code

The module now recovers from a timeout condition correctly. It can now be
used without the any connection and properly return an error after every
call. This has been tested with no attached sensors.