Convert from FIFOS to Sockets for bash

Hi Yihui, Here are my changes to use sockets. Seems to work ok for me. Thanks! -- Adam