Fixed texttohex function - use xxd, od, and lastly printf (printf won't work on OSX)