Factor `post_job`

This factors out 3 decent chunks of functionality into 3 separate methods. Also, I cleaned up some mime type handling.