Update file.php

Prevents security issue where $file can be an empty string or directory path. If that happens the deletion fails but the directory is left writeable with 0777 permissions. If $file is empty then this is interpreted by chmod as the current director, so root folder of Joomla site is left writeable.