Fix packing of chunk7/8 (game scripts). Should have been writing indexes/
offsets, but was writing script sizes. Also, totalSize was the wrong
value (masked because the variable had been used earlier)