Make read_in_full() and write_in_full() consistent with xread() and xwrite()