Repair the regex that detects the path for the copy plugin.