Added a byte swapping routine.  This fixes #3.