Fixed some errors in plugin path searching.