address conditions identified by Coverity

including fixing one potential crashing overflow bug in mcdbctl dump
Thanks: https://scan.coverity.com/

Modify Makefile to specify _D_XOPEN_SOURCE=700
POSIX.1-2008 adds requirement that mkstemp() create file with mode 0600
However, asking for POSIX.1-2008 with #define _XOPEN_SOURCE 700
does not necessarily mean that POSIX.1-2008 compliance is attained.
On the flip side, glibc <= 2.06, which used mode 0666, is very old.