Fix various bugs

- Templated FstGetBestHypothesis was not giving the expected
  result for strings
- tests.sh had a bug