Refixing startswith
Replacing memcmp() with strncmp() to be prepared for the case of the
prefix being longer than the string and avoiding SEGFAULTS.