fix write_update_entry function

The mistake was a write error: instead of entry[:sname] and entry[:gname] now
entry[:lastname] and entry[:firstname] is used.