Assure that gzoffset() is correct when appending.

An open() with O_APPEND followed by an lseek() to determine the
position will return zero for a non-empty file, even though the
next write will start at the end of the file.  This commit works
around that by doing an lseek() to the end when appending.
1 file changed