Save your work with layers intact as a .psd. Then merge all layers, layer>merge layers
then go edit>stroke.
To do a 3 pixel border, make your first stroke 3px black,then 2 px white then 1 px black.
To do a 3 pixel border with the middle one clear, duplicate your layer and on the bottom layer do 3px black, then do 2 px clear (use the mode drop down box to select clear) and then on the top layer 1px black (remember to change mode back to normal) and then in the layer palette, drag the bottom layer up so it is the top layer.
I explain things badly but hopefully you get the drift.