Change permissions on temp file prior to rename
Additional template vars to support improved theming
Cosmetic alignment fix