More robust path resolution.