patch - rest_client requests - ensure headers are written / read correct...

Hi,
Thank you for the gem and the maintenance ! 
There were still a few issues with handling the headers for RestClient requests.
These small changes fixed it.
Thank you in advance for integrating them.
Best
Nico