fixes in test code. done. ready to swith from rally
diff --git a/itest.py b/itest.py
index 6457aa8..4f631d7 100644
--- a/itest.py
+++ b/itest.py
@@ -40,21 +40,21 @@
                  keep_tmp_files):
 
         IPerfTest.__init__(self, on_result_cb)
+
         dst_testtool_path = '/tmp/io_tool'
-        self.files_to_copy = {testtool_local: dst_testtool_path}
         self.script_opts = script_opts + ["--binary-path", dst_testtool_path]
+        io_py_local = os.path.join(os.path.dirname(io.__file__), "io.py")
+        self.io_py_remote = "/tmp/io.py"
+
+        self.files_to_copy = {testtool_local: dst_testtool_path,
+                              io_py_local: self.io_py_remote}
 
     def pre_run(self, conn):
-        copy_paths(self.files_to_copy)
+        copy_paths(conn, self.files_to_copy)
 
     def run(self, conn):
-        io_py = os.path.dirname(io.__file__)
-
-        if io_py.endswith('.pyc'):
-            io_py = io_py[:-1]
-
-        args = ['env', 'python2', io_py] + self.script_opts
-        code, out, err = conn.execute(args)
+        args = ['env', 'python2', self.io_py_remote] + self.script_opts
+        code, out, err = conn.execute(" ".join(args))
         self.on_result(code, out, err)
         return code, out, err
 
diff --git a/rally_runner.py b/rally_runner.py
index cc95309..e9c4caa 100644
--- a/rally_runner.py
+++ b/rally_runner.py
@@ -65,6 +65,7 @@
 
     @functools.wraps(orig)
     def closure(self, ssh, *args, **kwargs):
+
         try:
             ssh._client.open_sftp
         except AttributeError:
@@ -106,7 +107,6 @@
         else:
             log("Test finished")
 
-            # result = {"rally": 0, "srally": 1}
             result = {"rally": 0}
             out = json.dumps(result)
 
@@ -121,10 +121,10 @@
 
 
 def run_rally(rally_args):
-    return cliutils.run(['rally'] + rally_args, categories)
+    return cliutils.run(['rally', "--rally-debug"] + rally_args, categories)
 
 
-def prepare_files(dst_testtool_path, files_dir):
+def prepare_files(files_dir):
 
     # we do need temporary named files
     with warnings.catch_warnings():
@@ -144,15 +144,11 @@
 
 def run_tests_using_rally(obj,
                           files_dir,
-                          testtool_py_args,
-                          dst_testtool_path,
                           max_preparation_time,
                           rally_extra_opts,
                           keep_temp_files):
 
-    yaml_file, py_file = prepare_files(testtool_py_args,
-                                       dst_testtool_path,
-                                       files_dir)
+    yaml_file = prepare_files(files_dir)
 
     try:
         do_patch1 = patch_VMScenario_run_command_over_ssh
@@ -172,7 +168,6 @@
     finally:
         if not keep_temp_files:
             os.unlink(yaml_file)
-            os.unlink(py_file)
 
 
 def get_rally_runner(files_dir,
diff --git a/ssh_copy_directory.py b/ssh_copy_directory.py
index d074fcf..5843c18 100644
--- a/ssh_copy_directory.py
+++ b/ssh_copy_directory.py
@@ -69,7 +69,7 @@
 
 
 def copy_paths(conn, paths):
-    sftp = conn.open_sftp()
+    sftp = conn._client.open_sftp()
     try:
         for src, dst in paths.items():
             try: