Added helper mkdirs method