title: Os.walk wont work with directory matched with regex
body: <p>This is the code i used. Why cant os walk handle ?</p>
  
  <pre><code>import os, re
  
  cwd = os.getcwd() 
  directory= 'Box II'
  dirpattern = re.compile(r'^.*?\\'+directory+'.*?', re.M)
  
  for root, dirs, files in os.walk(os.path.abspath(cwd)):
      if dirpattern.search(root):
          match = dirpattern.search(root)
          match=match.group(0)
  
  print match #OUTPUT = D:\dir1\dir2\dir3 (the directory i searched for)
  
  for root, dirs, files in os.walk(os.path.abspath(match)):
      print files #OUTPUT = nothing
  </code></pre>
  
  <p>why cant i use the matched folder for a new os.walk loop?</p>