text: Title: [BUG] possible bug with trash and filename templates
  Body: ### Description
  
  With latest 2.13.0, I've encountered a few issues after configuring custom storage path with expression referencing custom field. I'm running paperless on Proxmox/bare metal installed via tteck's script. There are two issues I've encountered.
  1.  files aren't being properly deleted from media directory after deleting document and emptying trash
  2. export/import ends with error documents.models.Document.DoesNotExist: Problem installing fixture '/root/export/manifest.json': Document matching query does not exist.
  
  
  
  ### Steps to reproduce
  
  In order to reproduce the issue
  1. import any pdf document 
  2.  create new document type magazines
  3. create custom field path
  4. add new storage path with an expression {{ document_type }} / {{ custom_fields|get_cf_value('path')|replace("-", "/", 2)   }} / {{ title }}
  5. finally assign the document with 
     - document type
     - add custom field path and set it to aaa/bbb
     - configure storage path
    
  So far everything works fine.  In the media folder, document is renamed as expected in both archive and originals subdirectory.
  
  Now perform export using
     python3 manage.py document_export /root/export 
  Then delete the document and empty trash
    -> document is not deleted, but it gets moved from aaa/bbb subdirectory to None subdirectory,
  Also import ends with above mentioned error message  
   ->  documents.models.Document.DoesNotExist: Problem installing fixture '/root/export/manifest.json': Document matching query does not exist
  
  ### Webserver logs
  
  ```bash
  --
  ```
  
  
  ### Browser logs
  
  ```bash
  --
  ```
  
  
  ### Paperless-ngx version
  
  2.13.0
  
  ### Host OS
  
  Debian 12
  
  ### Installation method
  
  Bare metal
  
  ### System status
  
  ```json
  {
      "pngx_version": "2.13.0",
      "server_os": "Linux-6.8.12-2-pve-x86_64-with-glibc2.36",
      "install_type": "bare-metal",
      "storage": {
          "total": 10464022528,
          "available": 2987577344
      },
      "database": {
          "type": "postgresql",
          "url": "paperlessdb",
          "status": "OK",
          "error": null,
          "migration_status": {
              "latest_migration": "paperless_mail.0011_remove_mailrule_assign_tag_squashed_0024_alter_mailrule_name_and_more",
              "unapplied_migrations": []
          }
      },
      "tasks": {
          "redis_url": "redis://localhost:6379",
          "redis_status": "OK",
          "redis_error": null,
          "celery_status": "OK",
          "index_status": "OK",
          "index_last_modified": "2024-10-27T21:14:47.000542Z",
          "index_error": null,
          "classifier_status": "WARNING",
          "classifier_last_trained": null,
          "classifier_error": "Classifier file does not exist (yet). Re-training may be pending."
      }
  }
  ```
  
  
  ### Browser
  
  Firefox
  
  ### Configuration changes
  
  _No response_
  
  ### Please confirm the following
  
  - [X] I believe this issue is a bug that affects all users of Paperless-ngx, not something specific to my installation.
  - [X] This issue is not about the OCR or archive creation of a specific file(s). Otherwise, please see above regarding OCR tools.
  - [X] I have already searched for relevant existing issues and discussions before opening this report.
  - [X] I have updated the title field above with a concise description.