Symlinks support

Fix for http://youtrack.jetbrains.com/issue/RUBY-3251
It looks like we do not need realpath for 1.8, but need one for >1.9 and jruby