local_class -> YADM_CLASS
local_system -> YADM_OS
local_host -> YADM_HOSTNAME
local_user -> YADM_USER
local_distro -> YADM_DISTRO
The new names match the names used for j2/esh templates.
Instead of duplicating the permissions on the temp file, the permissions
are duplicated on the output file directly. If the output file exists as
read-only, it is made writeable first.
There are some environments which don't allow the mv to work if the file
itself is read-only.