Added extra error check.
Added extra error check.

It turns out that under some circumstances, the PHP HTTP stream
wrapper does not return an error code. Account for this.

hurongsheng/gokuai-swift,ktroach/openstack-sdk-php,gokuai/gokuai-swift,programster/openstack-sdk-php,hpcloud/HPCloud-PHP