Update build.php and adding test files

Some minor changes in basic structure.
Files in PHP folder with _ at the beginning indicates that this files
should be included in build.php