Implement renaming a resource.