Direction Dependence Analysis in the Presence of Confounders: Applications to Linear Mediation Models Using Observational Data