Cleaned up stdout capture invocation.

Change-Id: I775e016d31bde72772810ea49399a04eeb1c63a1