added pipe.c which is a simple implementation of pipe