Have a look at this site for the recommended method for doing this (this works in any program - just substitute your program's native format for PSD; for Preview, the native format is PDF). Due to the limitations of the JPEG format, it isn't possible to rotate a JPEG completely losslessly, but using this method will minimize the loss.