[added] method toArrayDefinition() for create JS files

- change build dirname
- added toArrayDefinition()  to Base class , example:

print_r("Ext.define('".$app->name.".model.".$model->className."',".json_encode($model->toArrayDefinition()).");");