diff --git a/SMP-analyze-remote.sh b/SMP-analyze-remote.sh
index 4087fcf091947d3f96ba4dab06bab72c2ea99a1e..4eaa58e0daedbfb3a734f8f0a41e3f179c6b9e04 100755
--- a/SMP-analyze-remote.sh
+++ b/SMP-analyze-remote.sh
@@ -8,10 +8,10 @@ if [ -z "$IDA_PRO_SERVER_PORT" ]; then
     IDA_PRO_SERVER_PORT=22
 fi
 
-directory=/tmp/`hostname`
+directory=/tmp/`hostname`_$$
 
 # Create unique directory on server
-ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST mkdir $directory
+ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST mkdir -p $directory
 
 echo "--DEBUG---------"
 pwd
@@ -73,4 +73,4 @@ copyAnswerStopTime=`date +%s`
 #echo "`hostname`,$copyTime,$waitTime,$executeTime,$copyAnswerTime" >> /tmp/`hostname`-results.txt
 
 # Cleanup
-#ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST rm -rf $directory
+ssh -p $IDA_PRO_SERVER_PORT $IDA_PRO_SERVER_USER@$IDA_PRO_SERVER_HOST rm -rf $directory