Inline this code in the `mkdir` callback below.  We had it as a separate function before, but now it's not necessary.