MDL-40528 abstract trashdir logic from file_storage