
A Black Border action is available in the Actions download. Before execution resize and sharpen the image — no need to flatten layers.
Expand the canvas to accommodate the border. Add a new layer for the border, position it under the photo, and color it black.