Add realpath for Windows

Fixes #4446
Add 2nd try if the 1st buffer is too small.
Merge pull request #4573 from karbarcca/patch-3

Add realpath for Windows
fix #4584
Merge branch 'master' of github.com:JuliaLang/julia into jb/de_event_repl