Fix cfgupgrade with non-default DATA_DIR