Added checker for paths which works on both Windows and Linux

This PR includes a checker that fixes path problems like OS-specific separators, case-sensitive files and symlinks.
This is added mostly for compatibility with both windows and linux.
This and the other short path test are not safe. It'll fail if you have different directories in your C:\ directory.  The ~1 is based on order in the directory, so Program Files might not always be ~1. So, like, if you have C:\Program and Stuff in addition to C:\Program Files, C:\Program and Stuff will actually be C:\Progra~1.  You should make your own directory with your own files that get shortened in a reliable way.