make-dissector-reg: minor tweaks

* use grep -c instead of a grep/wc combo;
* use cmp instead of diff, since we're only interested in whether the files
  are identical;
* remove the temporary file if it's the same as the existing one.

Change-Id: If61c5675535c483b9dc2aee179d7be58c7bd6e4f
Reviewed-on: https://code.wireshark.org/review/2894
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>