Fix srcdir != builddir, and add idiom for multi-output commands