Error in Session.send_raw()

Addresses issue ipython/ipython/#4839.