Append safely.

Fixes #16.