title: os.path.isdir() not recognizing directories when path is not current directory
body: <p>I have a list of directories (<code>purple</code>, <code>blue</code>, <code>red</code>) to be recognized in a main directory called <code>colors</code>.</p>
  
  <p>When I run this script from within <code>colors</code>:</p>
  
  <pre><code>path_to_folders = './'
  folders = [f for f in os.listdir(path_to_folders) if os.path.isdir(f)]
  print(folders)
  </code></pre>
  
  <p>I get the list of folders:</p>
  
  <pre><code>['purple', 'blue', 'red']
  </code></pre>
  
  <p>When I set <code>'path_to_folders = '../colors'</code> and run the script from outside of the <code>colors</code> directory, the directories encompassed within it are not recognized as directories, even though they are read in as <code>f</code>. </p>
  
  <p>The list of folders is empty: <code>[]</code>, but printing each <code>f</code> gives:</p>
  
  <pre><code>purple
  blue
  red
  </code></pre>
  
  <p>How can this be?</p>