index: Add a \n suffix to all writes

I broke this in #8.. sorry :/