Update exception handling code so it also works correctly on windows.
Update exception handling code so it also works correctly on windows.

apache/libcloud,andrewsomething/libcloud,andrewsomething/libcloud,Kami/libcloud,Kami/libcloud,mistio/libcloud,andrewsomething/libcloud,Kami/libcloud,apache/libcloud,mistio/libcloud,apache/libcloud,mistio/libcloud