Fix check_path() on Windows

Still needs testing on Linux
Fix bat-parsing on Windows
Fix broken tests on Windows