When I encode files with short filenames the output file repeat the mp3 extension.
Example:
lame ..... "c:\music\song.wav" "c:\music\song.mp3"

gives me a file with the name:

c:\music\song.mp3.mp3

It only happens if the filenames contain directory information and the filename is short.

Does anybody know how to avoid this problem? It is really a problem when you encode many files some of them with short filenames.