Same functionality and intent as normalize-string.pl