Add test of prior probability of a state sequence, with bug fixes.