memset 0 filepath to avoid cpy()+cat() on garbage

The heap could have been filled with previous strings previously. For
more safety, it is better to memset(0) the filepath char[] to make sure
strncpy() and strncat() will not be altered by previous garbage.