trim() the stderr output too

Change-Id: Ia6770c413354a09ca739980e70700306b209ae6f