added apigen.sh and fixed phpunit.sh