Fix issues #110 and #168.

This is an attempted fix at handling chunked transfer encoding in responses. This probably is not living in the correct place, but it appears to be working?