title: Python os.walk always attaches root
body: <p>For my study I'm busy with a project in Python.</p>
  
  <p>I'm quite stuck atm on something very odd..</p>
  
  <p>Here's the code I'm running (well a small part of the code but it also produces the same error):</p>
  
  <pre><code>import os
  
  path_input = raw_input('Give path to check for documents(e.g. /Users/Frank/Desktop): ')
  if os.path.isdir(path_input):
      for root, dirs, files in os.walk(path_input):
          for file in dirs:
              if os.path.splitext(file)[1].lower() in ('.docx', '.pdf', '.doc', '.pptx', '.txt',
                  '.ppt', 'xls', 'xlsx'):
                  print(os.path.abspath(file))
  else:
      print("\nPlease enter a valid path, for example: '/Users/Frank/Documents.'")
  </code></pre>
  
  <p>It reads any file it comes across, it finds in the os.walk, but whenever when <code>print(os.path.abspath(file))</code> part comes, it always attached my root folder of where the script is stored.</p>
  
  <p>I can't seem to find out what I'm doing wrong.</p>
  
  <p><strong>Update(added example of output):</strong></p>
  
  <pre><code>/Users/Username/Dropbox/Test/Python/version5.txt
  /Users/Username/Dropbox/Test/Python/version6.txt
  /Users/Username/Dropbox/Test/Python/version7.txt
  </code></pre>
  
  <p>As you can see, it always says "/Users/Username/Dropbox/Test/Python/"
  Which is the same location as the python script it stored while the .txt files are stored in another location.</p>