Raise an exception if the state_dir doesn't exist.