Support non-default binlog filenames

Add support for bin log file names that are shorter than the default.
Handle events per more than 2 packets