Update ByteArrayTools to operate correctly on signed byte arrays