Make sure Logdir is created.

- FIxes bug 950902.

Change-Id: I1e387b4c97551744673281fdeae61d87c1fc39ab
diff --git a/stack.sh b/stack.sh
index eead8a1..1562886 100755
--- a/stack.sh
+++ b/stack.sh
@@ -472,6 +472,7 @@
     LOGDAYS=${LOGDAYS:-7}
     LOGDIR=$(dirname "$LOGFILE")
     LOGNAME=$(basename "$LOGFILE")
+    mkdir -p $LOGDIR
     find $LOGDIR -maxdepth 1 -name $LOGNAME.\* -mtime +$LOGDAYS -exec rm {} \;
 
     TIMESTAMP_FORMAT=${TIMESTAMP_FORMAT:-"%F-%H%M%S"}