Use rstrip instead of strip when stripping newlines from scripts