Fix commented-out code in case it ever gets used:
- Terminate argument lists of dangerous coreutils usage
- Add missing rm
Properly quote all strings used in "if [", see http://mywiki.wooledge.org/BashPitfalls#A.5B_.24foo_.3D_.22bar.22_.5D