I'm getting an IOError at this line. I looked into it and it turns out it was because I didn't have a mailroom_letters directory on my system when I tried to create the letters.

Luckily, it looks like you're familiar with the os module and can find what you need here: https://docs.python.org/2/library/os.html#os.mkdir
Be sure to include a try/except block for handling the case where the mailroom_letters directory does already exist.