fixing regex for caching headers and only setting headers for known versioned files - fixes #813