Escape newlines properly.