Do not use _wfopen() for DOS device filenames

It appears that CONIN$ can be opened correctly by fopen(), but not
_wfopen() (with "CONIN$" passed in the correct format, of course).

Reported by Ray Kolbe.

It was also reported in https://github.com/msysgit/msysgit/issues/153, for
some definition of "reported": it was not only reported to the wrong
repository but also so incomplete as to be contemptous of the time of the
people asked for help.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge pull request #111 from msysgit/fix-https-prompt

Do not use _wfopen() for DOS device filenames
Fix handling of long recursive paths

The commit in msysgit/git#86 attempted to better handle recursive
paths that would exceed MAX_PATH on Windows, since the paths would
be too long to fit in Git's buffers when expressed relatively,
but could easily fit when reduced back to a canonical path.  This
also adds a testcase that was lacking from the original commit that
attempts to describe the behavior.

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>