`writePositions` writes footer separately.

Convert final use of `writePositions` to write footer separately.

See #356.
See #355.
See #107.
See #4.