n2c/n2cq fixes

Fix crash-on-empty-history in newline_to_comma and newline_to_comma_quoted.