pathtools: Fix leaks in get_relocated_path_list

.. and reduce the (exclusive of callee) malloc count to 1.