title: Python os.path.isdir returns true for dots
body: <p>I'm programming my own shell in python. Right now I'm trying to implement the <code>cd</code> command to my shell.</p>
  
  <p>The function that performs this command has several variables:</p>
  
  <p><code>self.current_dir = "C:\\"</code> - The default value, it changes depends on the user's input using the cd command</p>
  
  <p><code>dir = "..."</code> - The requested directory that the user types. "..." is an example for an input that causes the problem.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>def command_cd(self, dir):
      if os.path.isdir(self.shell.current_dir + dir):
          self.shell.current_dir = self.shell.current_dir + dir + "\\"
  </code></pre>
  
  <p>The problem is that for some strange reason, <code>os.path.isdir(self.shell.current_dir + dir)</code> returns <code>True</code> when the user types dots (Just like the example inputs for the variables which I gave above). </p>
  
  <p>The problem occurs even if you change the amount of dots (even above 5 dots) and I really have no idea what causes it.</p>
  
  <p>There's obviously no folder named <code>...</code> or anything like it.</p>
  
  <p><strong>If my problem isn't clear enough please comment and I'll edit it</strong></p>