fix absolute path check for ruby 1.8.7

Ruby 1.8.7 returns the ascii code for string[n]: http://ruby-doc.org/core-1.8.7/String.html#method-i-5B-5D