private string RemoveAllLeadingSpacesFromLines(string script)
{
StringReader sr = new StringReader(script);
StringWriter sw = new StringWriter();
string thisLine;
while ((thisLine = sr.ReadLine()) != null)
{
sw.WriteLine(thisLine.Trim());
}
string returnValue = sw.ToString();
sr.Close();
sw.Close();
return returnValue;
}