Robust send training data

Just in case the user unplugs the USB stick between the
transfer started and it reached the training data upload
bit.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Merge pull request #40 from tchx84/robust-send-data

Robust send training data