implement simple file IO for Buffers

Make Buffers read from a file when constructed and initialize their internal state.
Make Buffers able to write back to their file;