encode command to ascii-8bit when on jruby

I found out that the command needs to be encoded with ascii-8bit when using jruby. Otherwise the multibyte characters are not correctly interpreted.

I do not know if this encoding should be done when using jruby on windows but the current implementation will do it anyway.

This relates to an issue in paperclip https://github.com/thoughtbot/paperclip/issues/1702