Platform-dependent version of escapeshellarg().
Given the target platform, return an appropriately-escaped
string. The target platform may be omitted for args that
are /known/ to be for the local machine.