Make engine detection more robust

the engine detection relies on full path name which can be different if symlinks are part of the game. We encountered this problem with a Capistrano deploy that symlinks ```release/.../vendor/bundle``` to the ```shared/vendor/bundle```.
The ```full_gem_path``` contained the ```release/.../vendor/bundle``` path, but the ```engine.root``` contained the ```shared/vendor/bundle``` path