Make the script more friendly when running under python debugger.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156939 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/redo.py b/test/redo.py
index e8ca91b..eee1130 100755
--- a/test/redo.py
+++ b/test/redo.py
@@ -113,6 +113,8 @@
     global filename_components
 
     test_dir = sys.path[0]
+    if not test_dir:
+        test_dir = os.getcwd()
     if not test_dir.endswith('test'):
         print "This script expects to reside in lldb's test directory."
         sys.exit(-1)