WIP: begin to flesh out file IO functions.

does not compile right now. just checking in to make it availailable
to me on another machine.