Fixed bug GROOVY-6778

The string "-d" is being used to escape dashes. Thus, converting all dashes to "-d" must be the first replacement that is done (it was) and converting them back must be the last (it wasn't). The bug resulted in the following erroneous conversion:

"-n" -> "-dn" -> "-n" -> "?"