Allow periods in url

Changes the logic to detect whether we're serving an asset so you can still have periods in your application routes.
I believe that there is trailing whitespace here (per JSHint error).