Fix inconsistent indentation, make sed -r detection actually work.

(Running `sed -r` without any pattern fails even if sed supports -r)