Update cookies.rb

Updated nil exception when there are no set-cookie values.  Fixed cookie being set to the appropriate header line.