Added several utilities for reading and writing to files.