s/    /\t/

As vile as tabs are, you ARE using them, so don't have one method there using spaces instead.