Renamed version of plugin_directory. It's a little smarter but not really more intelligent.