append '\0' to the buffer read by readlink()