demmt: handle writes between end of mmaped region and end of last page