common.config: Fix no $TEST_DIR directory

mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
diff --git a/common.config b/common.config
index bdd0530..d5a72af 100644
--- a/common.config
+++ b/common.config
@@ -102,8 +102,12 @@
 
 [ -f /etc/qemu-iotest.config ]       && . /etc/qemu-iotest.config
 
+if [ -z "$TEST_DIR" ]; then
+	TEST_DIR=`pwd`/scratch
+fi
+
 if [ ! -e "$TEST_DIR" ]; then
-    TEST_DIR=`pwd`/scratch
+	mkdir "$TEST_DIR"
 fi
 
 if [ ! -d "$TEST_DIR" ]; then