Fixed bug in command hash codes

The perl script and c implementation of the hash function
were using different widths of integers.  Fixed with slightly
different implementation that should avoid the high-bit
effects.