Improve autodetection of Rails asset pipeline files.

This prevents Standalone from incorrectly setting caching headers
on non-asset pipeline files.
Closes GH-1225.