Tidy current footer function.

Use the position returned from `writeEntry` instead of the position
stashed in the header.

See #358.