Simplify is_executable_in_path.
Move definition of helper function below their usage.
Remove unused return values.