bison: Workaround MS ftell() bug

When caret printing, open the source files in
binary mode to avoid ftell() problem described
here:
http://support.microsoft.com/kb/68337

Testsuite results are now:

ERROR: 413 tests were run,
79 failed unexpectedly.
24 tests were skipped.

The failures I looked at were both IO errors
in the testsuite.
pathtools: Re-write split_paths()

.. since the old one wasn't my own code so I'm
not in a postition to decide the license. Also
the old version was inefficient and buggy.

I also renamed some of the MSYS2 specific hacky
functions as:
msys2_get_relocated_single_path()
and:
msys2_get_relocated_path_list()

.. because all the others are general purpose
and not hacks at all (if they were upstreamed
in any codebases I'd be fine with that.)