Fixing some errors related to unlink() on windows