change escapes with Shellwords.shellescape and some cleanup
fix case when some of params are not Array