GROOVY-6778: Allow "-n" in filenames and command line arguments

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" -> "?"