Updated reverse a string script.