Use p_strcasecmp/p_strncasecmp instead of strcasecmp/strncasecmp
Move p_realpath logic to realpath.c
Introduce some consistency in definition/declaration ordering