Actually I took out the ones when I was poping from the stack and made sure I also have the null termination for when I store the terminal at the top of the stack in the MetaProcessor constructor and still get: 
cling::MetaProcessor::unredirect The redirection file path not valid /dev/pts/0���. 
if I don't repeat this null termination procedure when I pop from the stack as well...any idea why?