Try Unlocker.
It creates an entry in the right-click menu of files which will show you a list of processes that are accessing the file, through which you can then detach the process (or if needed kill it outright).
I use Unlocker regularly to help me safely eject USB drives that like to have handles kept open and more often than not it does help. The only downside I have found (and this may not be a problem with Unlocker itself, but with the programs that are keeping the handles open) is that most times simply detaching the process doesn't work and I have to kill it outright.
While there are a number of more feature-full programs that can perform the same functionality as Unlocker, for the purpose of releasing file handles this is the one I have found to be quicker and to work more consistently.
Note: Please be aware Unlocker contains potentially malicious adware in the installation process and employs the OpenCandy advertising module in its installer. If you are cautious during the installation process, read every dialog presented to you, and deselect anything that doesn't sound like it is part of Unlocker then you can easily avoid installing anything malicious on your system.
The following image shows the dialog that I received as a result of the OpenCandy module, where I have already selected "Advanced" and unchecked the "Install Delta toolbar" checkbox:
