use Kernel#puts for 1.8 support

also checks for the script's basename (check_graphite.rb isn't the correct name now, and might change in future).