Fixed stativ vars in class functions.
Fixed:Global var scope not adding var in right place.

https://github.com/Danack/PHP-to-Javascript/issues/13
Added test completion test to examples.

As the class test was broken and I hadn't noticed for a while.