Work around bug in open(2) wrt O_TRUNC and O_SHLOCK|O_EXLOCK. pw_mkdb() now returns -1 if ptmp is size 0.