Fixing read_data so that we only read into the curl data pointer the amount that it
expects (didn't realize this before). Should also make things faster...