fix(rewrite_tester): more reliably sniffs active rewrite rules

Under certain conditions curl would fail to open localhost URLs where
file_get_contents would handle fine. This tries file_get_contents first
instead of curl.

Fixes #6656
Merge pull request #6659 from mrclay/6656

fix(rewrite_tester): more reliably sniffs active rewrite rules
Merge github.com:Elgg/Elgg