diff --git a/plugins/views_data_export_plugin_display_export.inc b/plugins/views_data_export_plugin_display_export.inc
index ce2c6d7..59def5a 100644
--- a/plugins/views_data_export_plugin_display_export.inc
+++ b/plugins/views_data_export_plugin_display_export.inc
@@ -293,6 +293,9 @@ class views_data_export_plugin_display_export extends views_plugin_display_feed
     $this->batched_execution_state = views_data_export_new($this->view->name, $this->view->current_display, $this->outputfile_create());
     views_data_export_view_store($this->batched_execution_state->eid, $this->view);
 
+    // Record a usage of our file, so we can identify our exports later.
+    file_usage_add(file_load($this->batched_execution_state->fid), 'views_data_export', 'eid', $this->batched_execution_state->eid);
+
     // We need to build the index right now, before we lose $_GET etc.
     $this->initialize_index();
     //$this->batched_execution_state->fid = $this->outputfile_create();
@@ -724,6 +727,10 @@ class views_data_export_plugin_display_export extends views_plugin_display_feed
 
     // Save the file into the DB.
     $file = $this->file_save_file($path);
+    // Make sure the file is marked as temporary.
+    // There is no FILE_STATUS_TEMPORARY constant.
+    $file->status = 0;
+    file_save($file);
 
     return $file->fid;
   }
diff --git a/views_data_export.module b/views_data_export.module
index 1861b14..0821a37 100644
--- a/views_data_export.module
+++ b/views_data_export.module
@@ -37,13 +37,14 @@ function views_data_export_file_download($uri) {
   if (views_data_export_is_export_file($uri)) {
     $result = -1;
     // Allow only owners to access export files.
-    $file = current(entity_load('file', FALSE, array('uri' => $uri)));
-    if ($file && $file->uid == $GLOBALS['user']->uid) {
-      // This is only necessary for file_download_headers() to return a result
-      // evaluating to TRUE, in case no other module added any header.
-      $result = array('X-Drupal-ViewsDataExport' => 1);
+    foreach (entity_load('file', FALSE, array('uri' => $uri)) as $file) {
+      if ($file && $file->uid == $GLOBALS['user']->uid) {
+        // This is only necessary for file_download_headers() to return a result
+        // evaluating to TRUE, in case no other module added any header.
+        $result = array('X-Drupal-ViewsDataExport' => 1);
+      }
+      return $result;
     }
-    return $result;
   }
 }
 
@@ -57,7 +58,12 @@ function views_data_export_file_download($uri) {
  *   TRUE if the URI identifies an export file, FALSE otherwise.
  */
 function views_data_export_is_export_file($uri) {
-  return file_uri_scheme($uri) == 'temporary' && strpos(file_uri_target($uri), 'views_data_export') === 0;
+  foreach (entity_load('file', FALSE, array('uri' => $uri)) as $file) {
+    // See if this is an export file.
+    $usages = file_usage_list($file);
+    return !empty($usages['views_data_export']['eid']);
+  }
+  return FALSE;
 }
 
 /**
@@ -144,9 +150,10 @@ function views_data_export_garbage_collect($expires = NULL, $chunk = NULL) {
     }
 
     // We do two things to exports we want to garbage collect
-    // 1. Delete the index table for it, if it is still around
-    // 2. Delete the row from the exports table
-    // 3. Delete the view from the object_cache
+    // 1. Delete the index table for it, if it is still around.
+    // 2. Delete the files used during the export.
+    // 3. Delete the row from the exports table.
+    // 4. Delete the view from the object_cache.
     if (count($eids_to_clear)) {
       foreach ($eids_to_clear as $eid) {
         // 1. Delete index table, if it is still around for some reason
@@ -154,14 +161,19 @@ function views_data_export_garbage_collect($expires = NULL, $chunk = NULL) {
         if (db_table_exists($table)) {
           db_drop_table($table);
         }
+
+        // 2. Delete the files used during the export.
+        foreach (views_data_export_export_list_files($eid) as $file) {
+          file_delete($file, TRUE);
+        }
       }
 
-      // 2. Delete the entries in the exports table.
+      // 3. Delete the entries in the exports table.
       db_delete('views_data_export')
         ->condition('eid', $eids_to_clear, 'IN')
         ->execute();
 
-      // 3. Clear the cached views
+      // 4. Clear the cached views
       views_data_export_view_clear($eids_to_clear);
     }
 
@@ -169,6 +181,25 @@ function views_data_export_garbage_collect($expires = NULL, $chunk = NULL) {
   }
 }
 
+/**
+ * Determines where a file is used.
+ *
+ * @param $eid
+ *   The ID of a Views Data Export.
+ *
+ * @return array
+ *   An array of loaded files objects used by the specified export.
+ */
+function views_data_export_export_list_files($eid) {
+  $result = db_select('file_usage', 'f')
+    ->fields('f', array('fid'))
+    ->condition('id', $eid)
+    ->condition('type', 'eid')
+    ->condition('module', 'views_data_export')
+    ->execute();
+  return file_load_multiple($result->fetchCol());
+}
+
 
 /**
  * Batch API callback.
@@ -298,15 +329,3 @@ function views_data_export_view_clear($export_id) {
     ->condition('eid', $export_id)
     ->execute();
 }
-
-/**
- * Implements hook_file_presave().
- */
-function views_data_export_file_presave($file) {
-  // Ensure temporary files really are temporary.
-  // @see: https://drupal.org/node/2198399
-  if (views_data_export_is_export_file($file->uri)) {
-    // There is no FILE_STATUS_TEMPORARY.
-    $file->status = 0;
-  }
-}
