Replace process.env.platform with process.platform

This should fix detection of Windows systems, allowing for a correct specification of home directories.