Actually write the delimiter to output file.
Fixed tests.