title: "No such file or directory" from os.mkdir
body: <p>working on a python project, and what it does is it looks at the index of lifehacker.com, then finds all  tags with the class "headline h5 hover-highlight entry-title", then it creates files for each directory. But the only problem is that when i run it, i get <code>OSError: [Errno 2] No such file or directory: "/home/root/python/The Sony Smartwatch 3: A Runner's Perspective (Updated: 1/5/2015)"</code></p>
  
  <p>help would be lovely, thanks!</p>
  
  <p>heres my code atm:</p>
  
  <pre><code>import re
  import os
  import urllib2
  from bs4 import BeautifulSoup
  from mechanize import Browser
  
  url = "http://lifehacker.com/"
  url_open = urllib2.urlopen(url)
  soup = BeautifulSoup(url_open.read())
  
  link = soup.findAll("h1",{"class": "headline h5 hover-highlight entry-title"})
  file_directory = "/home/root/python/"
  
  for i in link:
      os.mkdir(os.path.join(file_directory, str(i.text)))
      print "Successfully made directory(s)", i.text, "!"
  else:
      print "The directory", i.text, "either exists, or there was an error!"
  </code></pre>