Update error handling of system errors and automatically attempt to reconnect a connection if a previous query has failed.
Merge pull request #11 from tyro89/master

Tweaks to error handling and added auto reconnect.