Search engine friendly URLs whitescreens the site if there is a tilde in the path.

The base URL can contain a tilde which conflicts with the `queryless_urls` regex, causing `preg_replace_callback` to return `null`. Using bracket delimiters would be better.

Example `$scripturl` that causes this issue:

    http://example.com/~username/index.php