Fix crash due to overrun in set_xterm_title()
Fix crash due to overrun in set_xterm_title()

buffer[4096] is past the memory allocated for the variable and shouldn't
be assigned.  In fact one doesn't need to set it at all since snprintf()
always adds NULL byte.  snprintf() and buffers of fixed size is not a
C++ way of doing this, so rewrote it using string stream instead.

ambientsound/pms,ambientsound/pms