(CFACT-37) Close open file descriptors before exec.

To ensure open file descriptors aren't leaked to spawned child
processes, close all open file descriptors above 2 (stderr) before
calling exec.