Fix state-root directory creation