use cogent.util.misc.create_dir to create directories (and you then won't need the try/except).