move getStateDir from Modelcore to ErlangEngine