Fix RegExps to support trailing / in URLs as well.

Only really required on paperjs.org, but let's keep code in sync.