Write binary mode so Rails doesn't shit the bed