Replaced read/write with readall/writeall and moved strlcpy and strlcat out of mv.c