Now doing os.path.dirname on correct file