Get the Polygonal Lasso tool and click from corner to corner around your object to put a selection outline around it.
After clicking on the 4th corner, move your mouse over the corner where you started (corner #1). When you see a circle next to your cursor, click to close your selection. You will now have a selection outline with "marching ants."
Press Ctrl J (Mac: Cmd J) to copy the object to a new layer.
Click back on the original photo layer in the Layer's palette to select it.
Get the Rectangle tool, and click and drag a rectangle as close to the size of the folder as you can. This will be your template.
Click on the layer above the Rectangle shape, the one with the object you selected out of the photo.
Get the Move tool, and make sure Show Bounding Box is checked in the options Bar.
Press and hold the Ctrl key (Mac: Cmd key) and move one corner at a time so it fits the corners of the rectangle in the layer below.
When you're satisfied, click on the check mark to accept it. Your object will now be "squared up."