Made the Windows/Linux path handling smarter