Can you replace this with qiime.util.create_dir() - that is the standard function for creating directories in QIIME (handles trying to create pre-existing directories better).