Revert file_name_utils to C

There seems to be a bug in the mingw compiler causing the build
to fail on windows.

Change-Id: I9e34a34d4e698c8c333ceee1681915f5062fd259