A more reliable way to determine sourced script's dir name.