Updated with extension prefix and IE compatibility

Using .file-[ext] instead of just .ext (discussion with @Remo), and 'class' attribute stringified to avoid IE compatibility issues from reserved words (thanks @mlocati)