Fix token calculation, etc

    It looks like RubyMotion's pack & unpack does not
    honor > in template string as big endian directive.
    Using alternative methods.