Detect read-only connections.

Closes #10
Merge pull request #17 from maginatics/feature/readonly

Detect read-only connections.