named pipes

port over @bigeasy’s changes to agent for named pipes