fixes CommandExecutionError when using pip state find_links with directory path

If the directory exists, an error will be thrown instead of passing it to the pip command line.
Merge pull request #7724 from sibsibsib/patch-1

fixes CommandExecutionError when using pip state find_links with directo...