static private ResourceFile resolveGhidraHome(String scriptPath) {
		ResourceFile pathFile = null;
		for (ResourceFile root : Application.getApplicationRootDirectories()) {
			int length = GHIDRA_HOME.length();
			String relativePath = scriptPath.substring(length);
			pathFile = new ResourceFile(root, relativePath);
			if (pathFile.exists()) {
				return pathFile;
			}
		}
		return pathFile;// return the last one even if it doesn't exist.
	}
Identifies an absolute directory path with the specified attributes.
@param path absolute directory path
@param isEnabled directory path will be searched if true
@param isEditable if true files contained within directory are considered editable
@param isReadOnly if true files contained within directory are considered read-only
Ghidra/Framework/Generic/src/main/java/generic/util/Path.java