Modified saveAsGob to skip gob encoding if the byte slice has length.