Fix regression in Config->setenv affecting post-processing scripts. Includes regression test