merge_pkg_paths() should be a method

This was a subroutine and needed instead to take a $self argument.