Since we're using our own mkdir, use mkdir -p to create subdirectories.
Should suffice for #140 but needs testing.