Add the "Set Matte" effect to the layer. Create the mask that you like for the Set Matte effect. INVERT mask. Make sure you invert the mask and not the Alpha channel. Set "Matte from the Layer" to NONE. Leave everything else as it is.
Duplicate this "Set Matte" effect and leave everything as it is.
Add "Solid Composite" effect IN BETWEEN two "Set Matte" effects. Leave it as it is, or change the color to the color you would like your outline to be.
Go to the first "Set Matte" effect and set "Mask Expansion" to the negative value. This will give you a white (or above-set color) outline. Set to the desired thickness.
Add the "Transform" effect before the first Set Matte effects. That will enable you to scale and reposition the main footage inside your mask "container".
You can add "Drop Shadow" or any other effect that will affect the edge if you need it. Make sure to add this effect all way at the bottom - after all effects.
Take a look at the attached image for the visual representation of the above.