private static CommandTuple GetCommandTuple(string installationDir, Command command, bool escapePath)
{
string path = Path.Combine(installationDir, command.Path.Replace('/', Path.DirectorySeparatorChar));
string arguments = command.Arguments.Select(arg => arg.ToString()).JoinEscapeArguments();
string commmandLine = escapePath ? ("\"" + path + "\"") : path;
if (!string.IsNullOrEmpty(arguments)) commmandLine += " " + arguments;
return new CommandTuple(commmandLine, command);
}