-#!/usr/bin/ruby\r
-#\r
-# Load rbot from this directory. (No need to install it with setup.rb)\r
-#\r
-\r
-BASEDIR = Dir.pwd\r
-\r
-#puts "Load path: #{$LOAD_PATH.inspect}"\r
+#!/usr/bin/ruby
+#
+# Load rbot from this directory. (No need to install it with setup.rb)
+#
+
+SVN_DIR = File.expand_path(File.dirname('__FILE__'))
+puts "Running from #{SVN_DIR}"
+
+$:.unshift File.join(SVN_DIR, 'lib')