Send properly sized packets when reading/transfering target.xml

Signed-off-by: Josh Kilmer <srjek2@gmail.com>