File creation and rw test command
Replacing implementation of strncpy()

Original strncpy was just a quick hack and was later
incorrectly fixed to do something that strlcpy() is
specified to do. So this makes strncpy() work like the
standard version.

This commit also replaces strncpy() with strlcpy() on some
places as there might have been wrong expectations on how it
actually works.
Merge remote-tracking branch 'remotes/origin/strxcpy_patch'

Some fixes to usage of string copy functions.