fate: add an option to generate the references

Useful to add or update fate tests.
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  fate: add an option to generate the references

Conflicts:
	doc/fate.texi
	tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
fate: Print correct error message for reference generation too

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>