Scratch that. Pathname.write wasn't working at all, so I've gone back to using system. But I did remove the full path to autoconf and it seems to work.