This error suggests a configuration error is resulting in Drupal attempting to remove what it thinks is a file, when in actual fact it is trying to remove a directory.
If this problem persists it is lilely that your data will become out of sync with the filesystem and possibly a node record has a file field with an invalid value.