Just so that you know, there is a new StackExchange beta site: Astronomy. You can ask astronomy-related questions there, or search for questions other people have asked. Hopefully, you will get some good answers.
--noauthmd5 --ssl1 --ssl2
--host1 mail.me.com --user1 'your.icloud.name'
--host2 imap.gmail.com --user2 'email@example.com'
--folder 'your/folder/to/be/copied' --sep1 '/'
--prefix1 '' --prefix2 '[Google Mail]' --sep2 '/'
The important parts here are the user names for the IMAP servers. Note that you need to generate an application specific password, if you are using Google two factor authentication! Also important is the “[Google Mail]” IMAP prefix.
Edit: It seems gmail has a weird interpretation of all the IMAP folders and stuff. Since they are using labels, the above script might create a weird label for the copied emails, but they will be there nevertheless!