Fix null pointer exception on relative path started with ../.