KNL-1167 If deleting fails unlock the resource so it can be tried again.

Previously if the delete failed when you next tried to delete the file you would get an InUseException.

git-svn-id: https://source.sakaiproject.org/svn/kernel/trunk@134208 66ffb92e-73f9-0310-93c1-f5514f145a0a