I believe this issue mainly arises from the fact that some constants on windows environments contain a mixture of \ and / in the paths (which stems from define( 'ABSPATH', dirname(__FILE__) . '/' ); using \), whilst most core functions standardise on / in created paths.. and even some of the API's do a str_replace('\\','/'..