original:
zelda3.jpg

convert zelda3.jpg \( +clone -blur 10x4 -fill white -colorize 30% \) \
\( +clone -gamma 0 -shave 30x30 -bordercolor white -border 30x30 \) \
-composite \
\( +clone -gamma 0 -shave 30x30 -bordercolor white -border 1x1 -bordercolor black -border 29x29 \) \
-compose screen -composite zelda3_test1.jpg

I am not sure -gamma 0 is meaningful?
But here is a simpler way:
convert zelda3.jpg \( +clone -blur 10x4 -fill white -colorize 30% \) \
\( -clone 0 -shave 30x30 -bordercolor white -border 1x1 \) \
-delete 0 -gravity center -composite \
zelda3_test2.jpg

Is this not what you wanted? Perhaps I misunderstand your problem.
By the way, it has been since OS 9 that I did any real Applescript. At that time I used a Mac version of ImageMagick (ImageMagick_AE by Leonard Rosenthol). I would be very interested in knowing how you go about interfacing Applescript with the OSX version of ImageMagick and how you issue Applescript commands to it these days.
Thanks
Fred