Replace strcpy function by strncpy.
Add checks lengths.
Remove mdirent old version.