title: rsync + ssh in python subprocess gets error with spaces in directory name
body: <p>When I run my Python application (that synchronizes a remote directory locally) I have a problem if the directory that contains my app has one or more spaces in its name.
  Directory name appears in ssh options like "<code>-o UserKnownHostsFile=&lt;path&gt;</code>" and "<code>-i &lt;path&gt;</code>".
  I try to double quote paths in my function that generates the command string, but nothing. I also try to replace spaces like this: <code>path.replace(' ', '\\ ')</code>, but it doesn't work.
  Note that my code works with dirnames without spaces.
  The error returned by ssh is "garbage at the end of line" (code 12)
  The command line generated seems ok..</p>
  
  <pre><code>rsync -rztv --delete --stats --progress --timeout=900 --size-only --dry-run \
      -e 'ssh -o BatchMode=yes \
      -o UserKnownHostsFile="/cygdrive/C/Users/my.user/my\ app/.ssh/known_hosts" \
      -i "/cygdrive/C/Users/my.user/my\ app/.ssh/id_rsa"'
      user@host:/home/user/folder/ "/cygdrive/C/Users/my.user/my\ app/folder/"
  </code></pre>
  
  <p>What am I doing wrong? Thank you!</p>