Make database generator compatible with PHP < 5.3.6

The function [DirectoryIterator::getExtension](http://www.php.net/manual/en/directoryiterator.getextension.php) was added in PHP 5.3.6.

This solves the installation of [PHPCI](https://github.com/Block8/PHPCI) with PHP 5.3.3.