Check path for file comparison.

This patch removes the straight-forward string matching for file or function
names and instead uses file paths (or function names) for comparion. The
is_same_file() function was moved from the MINST class to common/generic_defs.h
for this purpose.