Two mkdir fixes

Reported by Lucas Nussbaum
Fix a bug introduced with the trust option

Thanks Lucas Nussbaum for reporting it.