Fix invalid directory references.