add EXPERIMENTAL _detectPrefixPath and complete detecting.