Fixed command executor path check

Review: https://reviews.apache.org/r/25205