Move getFileContents logic away from streams.

 - C++ file streams are discouraged due to poor
 error handling (as well as poor i18n).
 - closes #49.