Fix: ems_write returned a wrong byte count
Fix: ems_write returned a wrong byte count

Also precise that it's a failure case when the returned byte count doesn't
match the count parameter

mikeryan/ems-flasher,mikeryan/ems-flasher