Fix EZP-21738 - Warning: fopen & chmod

This addresses the issue http://jira.ez.no/browse/EZP-21738 in legacy appears the following warnings if xdebug is enabled

Warning: fopen(var/ezdemo_site/cache/ezfile-tmp.c19d06360486837d05e3623a1f206cc3) [function.fopen]: failed to open stream: No such file or directory in /var/www/ezp/ezpublish_legacy/lib/ezfile/classes/ezfile.php on line 64

and

Warning: chmod() [function.chmod]: No such file or directory in /var/www/ezp/ezpublish_legacy/kernel/classes/clusterfilehandlers/ezfsfilehandler.php on line 214