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.
Yup. JSHint tripped out locally so I missed a couple of these.. fixing it now, will squash the commits together then,