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.
Update file.php
Update file.php
Merge pull request #3448 from fcoulter/staging

Update file.php
Merge branch 'staging' of https://github.com/joomla/joomla-cms into staging