Update shapes.rb

change __dir__ to File.dirname(File.realpath(__FILE__)) for compatibility with Ruby v<2.1