I was able to get my IMAP e-mail back to normal by following this sites instructions. Basically I only needed to follow the instructions under setting mail.app straight. which basically has you tell the mail app which folders should be for trash, sent, etc... very easy fix.
http://superfluousbanter.org/archives/2007/04/setting-up-imap-in-apple-mail/
for some reason google is flagging this site as "bad" but it is ok. if you are not comfortable, here is the text from the site:
Setting Mail.app Straight
Now that you’ve made sure the folders exist, in order for Mail.app to save your drafts or copies of your sent messages it needs to know where to put them, so this final step is the most important:
1. Click the folder name that matches the function you want to assign (e.g. “Sent”) so it is highlighted in the list
2. Go to Mailbox → Use This Mailbox For → [function name] (e.g. “Sent” again)
That’s all there is to it,your folder will disappear from the list, and reappear as a sub-folder beneath the function you specified, with the same name as the account it’s connected to. So, if your account name is “My IMAP Account”, the “Sent” folder will now be located under “Sent → My IMAP Account” in the Mail.app sidebar.