Write board_save_to_file unit tests

This commit adds the board_save_to_file unit tests, as well as
addressing a handful of bugs found in the save_board code.