I still wouldn't say mavericks particularly handles it 'the right way', although it does do it better than it did before in some ways as you mentioned. In mavericks it downloads multiple copies of messages that have multiple labels on them. Its smart enough to intelligently hide the copies, but it still takes up extra drive space. This is especially bad for gmail, since gmail encourages people to never delete mail, so most people have a *ton* of messages in all mail, so having to download all of all mail, and multiple copies of things in all mail is far from ideal.
The fact that it can archive properly now is good though, but I still don't like using mail.app with gmail. the problems are generally more to do with gmail's weird non-standard imap implementation than mail itself though, and mail.app isn't the only app that has annoying issues/quirks with gmail (most do in my experience), which is why I ended up switching away from gmail. Gmail typically only works 100% properly with clients designed especially for gmail. I prefer using a mail service that uses a standard imap implementation, and therefore works with no issues and quirks in many different mail clients
For webmail gmail is awesome, but for IMAP its usually just annoying.