EOL/whitespace normalizing
Bail out from infinite loop if regexp replace fails

While compiling complicated code, this magic loop sometimes
never stop. It's better to print non-well formatted string
that hang.

Better suggestions are welcome, how to fix this.
Use open3 to preserve command line AS IS.

Compiler execution via qx/.../ has the following side effect:
arguments that contain spaces/quotes will break to different
arguments. Also quotes are lost (shell eats them). So it's better
to call compiler subprocess passing unchanged array of arguments,
but not a string glued by spaces.