Several GL nodes related fixes

Fix crash when GL nodes file cannot be opened for writing
Remove redundant saving of GL nodes if they were loaded from cache
Fix crash on attempt to save cached OpenGL nodes on OS X