Using makedirs instead of mkdir, since we might have to create more than one directory.