game_tree. Use utility functions to write data to binary file.

Add a utility function to write unsigned int, char and string to binary file.
Change write implementation for all nodes to use utility functions.