fixup directory rewrite