Properly checking for shared object initialization. Normalizing filepaths so they work in the legacy flex compiler.

Based on the bugs pointed out by @UberschallSamsara. 

The existence of the `initialized` property on the shared object determines if it's been created before, and if not, don't initialize with bogus values.

Filepaths have been normalized so they work on both the legacy flex compiler as well as the newer one.