Ensure state directory