Patch from Marios Chatziangelou:

What it does:
- gets the authentication method to be used, by an env variable
VMCASTER_EGIAPPDB_AUTHN (default: x509)
- based on this authmethod it appends the appropriate suffix to the
newUri variable (/x509/ or /sso/)
- in the postdata function it either makes a typical
urllib2.HTTPBasicAuthHandler in case of authmethod=sso OR it uses a
custom class HTTPSClientAuthHandler in case of authmethod=x509