Protocol fixes for HP Prime

Thanks for this great library!

I was unable to transfer any files or screenshots from the Prime (firmware 2014 12 3 (6975)) on Linux.

This pull request fixes the issues with the protocol implementation that I was able to identify, and it now works perfectly for me.
I can make full backups, transfer large-ish (at least > 64 bytes) `.hpapp` files back to the calculator, and take screenshots (though only mode 9-11 work for me, mode 8 does not).

I'm not sure why this was working before for some other users, so there is a theoretical chance that this change might break compatibility for older firmware versions or something.