Since the PKGSRC project can be found on many, many Unix-like
platforms, this patch adds the base directory used by PKGSRC to
discover.ml's search path.
Create a function which replaces the last instance of the path
component.