Changed computation of base directory