While the launch services in OS X use file name extensions to associate files with various applications, generally users do not need to interact with these extensions and the system keeps them hidden by default; however, you can have the extensions shown, either globally or for specific files. If you edit the extension the system should prompt you for confirmation and then change the extension, but sometimes the system may revert the file name back or continually append the old file name to the new one.
To get around this problem, first try getting information about the file to make sure its extension is not hidden. Click the file and press Command-I (or right-click it and choose Get Info) and make sure the Hide Extension check box in the Name & Extension section is unchecked. Optionally, you can try changing the file name from within the Info window.
If modifying the file directly does not work, try changing the Finder's preferences for managing file extensions before editing the file. Go to the Finder menu and choose Preferences, and then check the box to show all file name extensions before trying to modify the file name in the Finder. When the file has been edited, revert the extension management settings back to what you prefer.