File utils to C++.

Preparation for moving get_libdir() into gmx::ProgramInfo.

Change-Id: Ic13b0567e7528e43ea03298f835b3d842ab44c28