pipecmd: fix fd leak.