bash to sh

pipe2eval.sh uses few bash specific features, the following changes modify the script to remove bashisms and make it sh compatible, I tested the code with python and shell snippets. It should not change nor provoke troubles but improve the changes to get run in more Unix platforms.