Avoid warning if no rewrite rules exist
Show messages as warnings, and change JSON output to empty array, not string
Clean up logic
.
Merge branch 'rewrite_notice'. closes #347