Bugfix - Prevent infinite recursion

When the recursive method list the files to make sure that the folder is empty (list_files), the delete_dir list again the self dir and the parent, and recursion is generated.

Logging:
```php
function delete_dir($filepath) {
  Logger::log('Deleting $item: ' . $filepath);
  ...
  if ($list !== false and count($list) > 0) {
    foreach ($list as $item) {
       Logger::log('Deleting $item: ' . $item);
  ...
```

Output:
```
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder/.. [] []
[2014-04-08 11:07:37] logger.INFO: Deleting $item: /folder [] []
```