Test and fix for "ArrayIndexOutOfBoundsException: Negative array index" with dot files

I found a request in my logs for /assets/.bash_history (presumably some kind of attack/probe) which caused:

java.lang.ArrayIndexOutOfBoundsException: Negative array index [-14] too large for array size 13
        at asset.pipeline.AssetsController.index(AssetsController.groovy:19)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at asset.pipeline.AssetPipelineFilter.doFilter(AssetPipelineFilter.groovy:62)


This pull request includes a test to reproduce the error and a fix to resolve it.