Auto-detect Rails Directory

The Rails REPL will fail to load if your rails project is in a subdirectory of the Sublime project folder. This fix will work its way up from the current file to find the rails directory.

Also fixes issues with the Rails REPL's scope and syntax highlighting