Whenever, under the provisions of this chapter, new railroads are constructed across existing highways, or highway changes are made either for the purpose of avoiding grade crossings on such new railroads, or for the purpose of crossing at a safer and more accessible point than otherwise available, the entire expense of crossing above or below the grade of the existing highway, or changing the route thereof, for the purpose mentioned in this section, shall be paid by the railroad company.