Raise routing errors for invalid or empty page ids

Visiting page_ids made entirely up of invalid characters raises a missing template error (because it doesn't match the regex checking for missing partials).

This commit adds a check to see if the page_id is empty after sanitisation, and raises and error if it is -- which is caught and turned into a routing error.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.