Why reinventing the wheel?
Did you already try this, too?
http://code.google.com/p/lightlook/

Each message has its own folder created containing its attachments, which can be easily opened by clicking in the message itself.