make file io a bit faster

Instead of copying the list<char> into a string and writing that,
just write individual chars.