Fix mprGetPathBaseRef returning foreign pointer