Fix bug in purple_xfer_read_file()

This was introduced in 499ffff1e77c and for purple_xfer_write_file()
fixed in 2b7c4c034594. File reading was for sure also affected since the
subsequent calculation of sent bytes and function's return value are
completely wrong.