More fixes for homedirs with spaces in their name.

Also, go on a quoting spree on places that weren't problems, so no one copies bad bash.