Add strndup and simple test