Fix separator in append() and compact()

Fixes #302.