Improvements to migrate_from_trac rake task

I must be the only person still regularly importing legacy projects from trac, but there have been a few issues with this rake task for a while. I'd fixed them locally and would like to see them upstream.

Thanks,

Brandon