samples/dumpit.py: fix hex encoding/decoding