First pass at binary file framework

First pass at the binary file framework with the purpose to eliminate
the need to write code for reading and writing files with binary
contents.