Use proper path separator in msys

For now, we are only checking the path on msys but
we may need to check it for cygwin too.

Thanks to @ToJans for providing guidance and debug
information to sort this issue out.