uri-tester: Avoid critical when unref-ing NULL regex

When a regex compilation fails we get an error and NULL. No need to
unref the NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=719405