Enhanced rename/copy hook unit tests to cover file name patterns

Some file name patterns used to have conflicts due to broken pattern
matching.
This change makes sure that such cases are covered.
Fixed share key deletion finding

When deleting keys for a given file, use the list of users that have
access.
When deleting keys for a folder, use a properly escaped regexp.