Wrap file_usage_list() with a function that can get boolean to avoid fatal errors.
Remove wrapper function, check specifically in each place.
Simplify code.
Merge pull request #5348 from openscholar/5327-11

Fix fatal errors when deleting files.