Writing csv file back out after question mark replacement