[BUGFIX] fix detection of static files to allow periods in urls

Changes the logic to detect whether we're serving an asset so you can still have periods in your application routes.