Sign savenumber to prevent wrong slot selection

tTe 'savenumber' member of the block footer was
originally unsigned. This caused an issue when
blocks had a savenumber with the MSB set as it
was incorrectly selected as the newest. This
should not be a common occurance but in testing
sometimes the unused Hall of Fame blocks had
their savenumber set to 0xFFFFFFFF.
Add support for saving to a new .sav file

Add functionality to repack the optionally
modified pokemon back into a .sav format that
will correctly load.

If an output file is not specified then we will
simply discard the changes.