Fix #8641, creating directories when we have stubs.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>