Upgrade brightray, fix #498.

Previous 476f545 was using the wrong commit of brightray which didn't
actually contain the fix.
Run user's main script before everything is initialized, fixes #543.