Beef up unit name validation

Fix #793
A template unit "foo@.service" is not a runtime unit, so it should not exist in the system. One can still submit "foo@1.service".