Properly handle unit names with dashes in them

We ended up with files in /etc/systemd/system called
"bigx2ddata.mount.wants" rather than "big\x2ddata.mount.wants".

(cherry picked from commit 4cada34b7f85b95c5e1c071ed629b7e6876a8a9a)