Fixed: Non-ASCII chars caused the script to fail

escapeshellarg strips out non-ascii characters if the UTF8 is not explicitly. This fix temporarily switches to UTF8 before calling escapeshellarg.