Correctly infer rompath directory from ROM pathname