This is starting to get pretty ugly. We need replace CR+LF with nothing (or would you prefer spaces?). But try this:
bcp "select char(34) + replace(replace(replace(ltrim(rtrim(diary)), replicate(char(34), 2), replicate(char(34), 4)), char(13), ''), char(10), '') + char(34) as diry from test.txt" queryout "path" -T -S servername -d dbname -b 500 -c -C 65001 -t~
And because of the command-line syntax, it has to be a single line.