There is a command line tool called "iTunes Connect Transporter" o just 'Transporter' to do just this. To get started login to iTunes Connect, goto "Manage Your Apps" and at the bottom there are several links. Under "Deliver of your Apps" you need the PDF files "Transporter User Guide" (the link to download Transporter is in this PDF) and "App Metadata Specification". With Transporter you can manage Game-Center Leaderboards and Achievements, and also all kinds of In-App Purchases.
To get you started try iTMSTransporter -m lookupMetadata ...
(check the guide) to download existing IAP, Leaderboads and Achievements, and see the structure of the XML file you have to edit (you edit it with the Xcode editor). Everything will be downloaded to an .itmsp file which is just a package (iTunes package). You can enter into this package by ctrl-clicking the file and selecting "Show contents of package". Then you can add, edit all the contents of this package before uploading.
Also, I recommend running iTMSTransporter -m diagnostic
to see if you have the required ports open.
I've used it and it works great. It takes a lot of time to configure a script to create the XML file the first time, but in the long run you save a LOT of time (and probably you do less mistakes too).
UPDATE:
Since this June 2013 iTMSTrasporter added the ability to upload app metadata (localized titles, descriptions, what’s new text, keywords, and screenshots, as well as territory rights, pricing, and availability), In-App-Purchase information and screenshots, hosted content (which I haven't used), and interval pricing (for the app itself and for IAP products). This makes iTMSTrasporter much more powerful.
By the way, when you introduce keywords you are only allowed 100 characters, and you can save a few characters by doing without spaces. So instead of: "keyword1, keyword2, keyword3, ..." you can put "keyword1,keyword2,keyword3,..." and it works.
Finally, a minor problem I encountered, if you create some Achievements or Leaderboards manually through iTunes Connect, and then try to reload or update some Achievements with iTMSTransporter, it will give you an error. But, if you create them with iTMSTransporter then you can update them without any problem as many times as you want.
I hope it helps!!