function reverseSubPath(path, subpath) {
    subpath = parseInt(subpath)==subpath ? subpath : false;
    var path = normalizePath(path),
        paths = path.replace(/M/g,'|M').split("|"),
        revpath;
    paths.splice(0,1);
    if (subpath !== false && subpath >= paths.length) {
      return path;
    }

    if (subpath === false) {
      paths = paths.map(function(spath) {
        return reverseNormalizedPath(spath.trim());
      });
    } else {
      var spath = paths[subpath];
      if (spath) {
        revpath = reverseNormalizedPath(spath.trim());
        paths[subpath] = revpath;
      }
    }

    return paths.join(" ").replace(/ +/g,' ').trim();
  }
This is the function that you'll actually want to
make use of, because it lets you reverse individual
subpaths in some <path> "d" attribute.