Use "mkdir -p" if it works, as that fixes bugs when making file names
with unusual characters. Quote chmod arg "$dirmode", in case it
contains white space.
Incorporate the following change from autoconf mkinstalldirs:
1999-04-10 Ben Elliston <bje@cygnus.com>
* mkinstalldirs: Add `-m' flag to specify the mode of a newly created
directory. Add command line usage and `-h', `--help' options.
Contributed by Jeff Garzik.