Fix build script to handle mediawiki.database and run PEP8