Use realpath on libraries with '..' in their paths