TrigByteStreamTools: Modernise mergeBSfiles script and add unit test
The mergeBSfiles script was broken as reported in ATR-21808. Fix, modernise, and add a unit test for the script.
Changes:
- use argparse instead of getopt
- use os.listdir to find files
- use logging module for messaging
- encapsulate code in functions
- add new option -N to copy only N events from each input file
- add a unit test