 -exec_and_log "$SSH $DST_HOST chmod a+w $DST_PATH"
 +exec_and_log "$SSH $DST_HOST chmod ug+w,o-rwx $DST_PATH"
  
-diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh
-index 3127108..9ab2bf4 100755
---- a/src/mad/sh/scripts_common.sh
-+++ b/src/mad/sh/scripts_common.sh
-@@ -32,6 +32,9 @@ SED=/bin/sed
- SSH=/usr/bin/ssh
- SUDO=/usr/bin/sudo
- WGET=/usr/bin/wget
-+CURL=/usr/bin/curl
-+GUNZIP=/bin/gunzip
-+BUNZIP2=/bin/bunzip2
- 
- # Used for log messages
- SCRIPT_NAME=`basename $0`
-@@ -117,3 +120,19 @@ function timeout_exec_and_log
-         exit $CMD_CODE
-     fi
- }
-+
-+function download_and_extract
-+{
-+    URL=$1
-+    ARCHIVE=$2
-+    EXTRACT_CMD=$3
-+    HOST=$4
-+
-+    if [ "x$HOST" != "x" ]; then
-+        SSH_CMD="$SSH $HOST"
-+    fi
-+
-+    $SSH_CMD $CURL -k -o $ARCHIVE $URL
-+    $SSH_CMD $EXTRACT_CMD $ARCHIVE
-+}
-+

 
-exec_and_log "chmod a+w $DST_PATH"
+exec_and_log "chmod ug+w,o-rwx $DST_PATH"

diff --git a/src/tm_mad/nfs/tm_clone.sh b/src/tm_mad/nfs/tm_clone.sh
index b54c826..b423e7c 100755
--- a/src/tm_mad/nfs/tm_clone.sh
+++ b/src/tm_mad/nfs/tm_clone.sh
@@ -39,21 +39,49 @@ log "DST: $DST_PATH"
 
 DST_DIR=`dirname $DST_PATH`
 
+
 log "Creating directory $DST_DIR"
 exec_and_log "mkdir -p $DST_DIR"
-exec_and_log "chmod a+w $DST_DIR"
-
-case $SRC in
-http://*)
-    log "Downloading $SRC"
-    exec_and_log "$WGET -O $DST_PATH $SRC"
-    ;;
+exec_and_log "chmod ug+w,o-rwx $DST_DIR"
 
-*)
-    log "Cloning $SRC_PATH"
-    exec_and_log "cp -r $SRC_PATH $DST_PATH"
-    ;;
-esac
-
-exec_and_log "chmod a+rw $DST_PATH"
+function _download_and_extract () {
+    case $SRC in
+    http://*.gz|https://*.gz)
+        log "Downloading GZip archive $SRC"
+        exec_and_log "download_and_extract $SRC $DST_PATH.gz $GUNZIP"
+        ;;
+    
+    http://*.bz2|https://*.bz2)
+        log "Downloading BZip2 archive $SRC"
+        exec_and_log "download_and_extract $SRC $DST_PATH.bz2 $BUNZIP2"
+        ;;
+    
+    http://*|https://)
+        LOCATION=$(python2.6 $(which stratus-manifest) --get-element location $SRC)
+        rc=$?
+        if [ "$rc" == "0" ] && [ -n "$LOCATION" ]; then
+            log "Image location from image manifest: $LOCATION"
+            SRC=$LOCATION
+            download_and_extract
+        else
+            log "Downloading $SRC"
+            exec_and_log "$CURL -k -o $DST_PATH $SRC"
+        fi
+        ;;
+    
+    pdisk:*)
+        log "Persistent disk handling $SRC $DST"
+        DST_HOST=`arg_host $DST`
+        exec_and_log "$SSH -t -t $DST_HOST sudo /usr/sbin/attach-persistent-disk.sh $SRC $DST_PATH"
+        ;;
+    
+    *)
+        log "Cloning $SRC_PATH"
+        exec_and_log "cp -r $SRC_PATH $DST_PATH"
+        ;;
+    esac
+}
 
+if [ -e $DST_PATH && ! -L $DST_PATH ]; then
+  exec_and_log "chmod ug+rw,o-rwx $DST_PATH"
+fi

diff --git a/src/tm_mad/ssh/tm_clone.sh b/src/tm_mad/ssh/tm_clone.sh
index 8507c43..fe80f7c 100755
--- a/src/tm_mad/ssh/tm_clone.sh
+++ b/src/tm_mad/ssh/tm_clone.sh
@@ -42,17 +42,40 @@ DST_DIR=`dirname $DST_PATH`
 log "Creating directory $DST_DIR"
 exec_and_log "$SSH $DST_HOST mkdir -p $DST_DIR"
 

-exec_and_log "ssh $DST_HOST chmod a+w $DST_PATH"
+exec_and_log "ssh $DST_HOST chmod ug+w,o-rwx $DST_PATH"
 
diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh
index 3127108..9ab2bf4 100755
--- a/src/mad/sh/scripts_common.sh
+++ b/src/mad/sh/scripts_common.sh
@@ -32,6 +32,9 @@ SED=/bin/sed
 SSH=/usr/bin/ssh
 SUDO=/usr/bin/sudo
 WGET=/usr/bin/wget
+CURL=/usr/bin/curl
+GUNZIP=/bin/gunzip
+BUNZIP2=/bin/bunzip2
 
 # Used for log messages
 SCRIPT_NAME=`basename $0`
@@ -117,3 +120,19 @@ function timeout_exec_and_log
         exit $CMD_CODE
     fi
 }
+
+function download_and_extract
+{
+    URL=$1
+    ARCHIVE=$2
+    EXTRACT_CMD=$3
+    HOST=$4
+
+    if [ "x$HOST" != "x" ]; then
+        SSH_CMD="$SSH $HOST"
+    fi
+
+    $SSH_CMD $CURL -k -o $ARCHIVE $URL
+    $SSH_CMD $EXTRACT_CMD $ARCHIVE
+}
+
diff --git a/src/tm_mad/lvm/tm_context.sh b/src/tm_mad/lvm/tm_context.sh
index ee7fd40..887d978 100755
--- a/src/tm_mad/lvm/tm_context.sh
