Wrap Elastic inclusion in file_exists for wmf17

Change-Id: I3639c216491fef282fd5311d888990f5b7d9f0d5
Non wikipedia wikis to 1.22wmf18

Change-Id: I5642f8cee99b5c2b7e8403e61a0080c21dde2181