Rename reference file extension to ".dgn"

I inherited a few 1,000 old MicroStation files with odd extensions ".2d" and ".3d". :>(

We would like to change them all back to ".dgn" for consistency, reduce confusion and so thumbnails work in Windows 7 

The problem is that will break all of the reference file attachments.

So I need code to rename only the extension to ".dgn" of all attached reference file. The Base-file name stays the same.