ShellHelpers cmd_dir should not return directories that match cmd_name

This failed for us when we had a directory named 'brew' that happened to be in the path.