Fix makedirs and add verbosity argument.