This is not how an Open/Save dialog box is supposed to work. Yes, it's supposed to remember the folder you last saved to, as a matter of convenience. But MacOS X apps should never save files into the Trash. It just does not make sense.
Update: Thanks to Vince Mease, I discovered that this bug is not at the OS level, it does not occur with Apple applications, only 3rd party apps. Apple's apps work correctly, but many non-Apple programs do not understand that you aren't supposed to save to hidden folders like .Trash
That's not a Mac OS X bug; it's Photoshop's fault. I couldn't reproduce this in other programs.