Improved script for fixing the wrong owner for user content.

References #502.