Adapted from http://wordpress.org/extend/plugins/posterous-importer/ to make a plugin that actually works.