Only redirect System.out and System.err if requested by environment variable.

Change-Id: Ief5f2b1e3f2d4ab984f1a0d14083707044dfad9a