function _resolvePath(name, tmpDir) {
  if (name.startsWith(tmpDir)) {
    return path.resolve(name);
  } else {
    return path.resolve(path.join(tmpDir, name));
  }
}
Resolve the specified path name in respect to tmpDir.

The specified name might include relative path components, e.g. ../
so we need to resolve in order to be sure that is is located inside tmpDir

@param name
@param tmpDir
@returns {string}
@private