Update shapes.rb

change \_\_dir\_\_ to File.dirname(File.realpath(\_\_FILE\_\_)) for compatibility with Ruby v<2.0