Prepend $publicDir to getFilename()
Add unit tests to CaptureCachePattern for getFilename()