more precise matching of theme and plugin names for renaming function

fix for when wp.org repo theme was being updated and if a GitHub theme was present and it had similar name to path of WP install the repo theme would be renamed incorrectly.