added out redirect functionality to testshellwithpope.c