Fix invalid script directory.