Adjust the regular expression for facts.

Previously this was incorrectly handling facts that were of the form
foo=1+1=2 due to the ='s in the actual fact contents.  Fix this and
add tests to try and prevent regressions.