replaced getExtension() to be compatible with PHP < 5.3.6

see: https://github.com/fabpot/PHP-CS-Fixer/issues/48