Fixing incorrect PIN computation on 64-bit devices.

This change is backwards-compatible with 32-bit devices.
Fixing format string warning.
Merge pull request #2 from GravityJack/64-bit-fix

Fixing incorrect PIN computation on 64-bit devices.