Improve php path split security and enable caching for .bmp and .swf