I think this is better handled with a shell script that, after changing the link, it calls ed2k to queue it, like this:
#!/bin/bash
OLDLINK="$1"
NEWLINK=`echo $OLDLINK | sed 's/\./ /g'`
NEWLINK=`echo $NEWLINK | sed 's/[a-zA-Z0-9]*$/\.&/g'`
NEWLINK=`echo $NEWLINK | sed 's/ \./\./g'`
ed2k "$NEWLINK"
save the file as ed2ktest.sh (or whatever you like) and to use it, change to the folder where you saved it and run it like:
./ed2ktest.sh "<ED2K LINK YOU WANT TO GET>"
it should do what you want.
Regards.
P.S: I know there are more efficient ways of doing the same, even with sed, or awk...but my sed-fu and awk-fu are pretty weak lately