from pathlib import Path


def make_paths_absolute(value: str, workdir: Path = Path.cwd()) -> str:
    """
    Detect if value is a relative path and make it absolut if so.
    :param value: Parameter value from arguments
    :param workdir: Path to workdir. Default: CWD
    :return:
    """
    if "../" in value and (workdir / value).exists():
        if (workdir / value).is_symlink():
            return str((workdir / value).absolute())
        return str((workdir / value).resolve(True))
    return value