Support MKD_* flags

Re-send. p-r.