Make versions and range like specifiers never match local files or dirs when a name is included

When integrated into npm, this will fix https://github.com/npm/npm/issues/6713