build-*ignore.pl: add -o option to specify what file to write

Add some getopt options for both build-gitignore.pl and
build-hgignore.pl:

 -v: be a little verbose
 -h: show a quick help message
 -o: specify the output file to write

build-hgignore.pl defaults to writing .hgignore, and
build-gitignore.pl defaults to writing .gitignore.  But you can use -o
to specify writing a different filename.