Ensure  command names in search path of run() or spawn() commands do not match folders.

fix for incorrect directory match