Fix logic in process_common_errors for unbalanced quotes
Tests at code level. Should be concise and to the point, and organized by subject.