Add data output, increase portability.

Adds module to output data to file. Further, changes types based on
operating system to allow for portability between Windows and Linux.