fixed issue 1 about read-only files. also tweaked hostname substitution to always do non-fqdn names