Fix parsing PATH on windows

Thanks to @vadimcn for the patch!