Changed line to delimiter=delimiter in csv.writer

This fixes #957