When changing dir's under windows environments:
<?php
$path="c:\temp"';
chdir($path);
/* getcwd() gives you back "c:\temp" */
$path="c:\temp\"';
chdir($path);
/* getcwd() gives you back "c:\temp\" */
?>
to work around this inconsistency
doing a chdir('.') after the chdir always gives back "c:\temp"