Properly shellescape file in remote_file

When doing `test` the file should be shellescaped
Merge pull request #1182 from mikz/patch-2

Properly shellescape file in remote_file