Update match() - add detection of binary format - tighten detection of ascii formats; ensure last byte is correct