CJam, 33 bytes
q~:i\fb:~0+2/W<Gfb:c' ,-'ÿ),127>-
Takes input in the form 6 "Hello, World!"
. [Test it here.][1]
See Dennis's answerSee Dennis's answer for a similar but better solution with a nice explanation.
[1]: http://cjam.aditsu.net/#code=q~%3Ai%5Cfb%3A~0%2B2%2FW%3CGfb%3Ac'%20%2C-'%C3%BF)%2C127%3E-&input=6%20%22Hello%2C%20World!%22