Rename traverses down to the parents of the paths you give it, so it should be locking a directory.