Added unit tests

Also removed the examples file as everything is now covered by the unit
tests.
Fixed issues found while writing the unit tests
Added kwargs to Client constructor with debug and verify certs

Added constructor option "debug" to enable debugging output.
Added constructor option "verify_certs" to enable SSL certificate
verification.