Check all pattern arguments passed to binary:matches/2

Including an empty binary as one of multiple patterns passed to
binary:matches/2 would crash BEAM with: "Cannot reallocate
1342177280 bytes of memory (of type "tmp")". This ensures each pattern
is valid before trying to match.