minor corrections to pipe function

Mini PR to add options to print stdout and stderr. In some of my scripts, this is really useful to make the output less verbose.