Locator: Preserve state on stdout/stderr handling in execute filter

Change-Id: I1f4f3cd1711945fd8763cdbf3039056b802cc03d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>