helpers.py: use returncode to get the subprocess exit code in readpipe().

Hello?  It's returncode, not retcode -- and how about a test?

Signed-off-by: Rob Browning <rlb@defaultvalue.org>