Using gsub to remove the rails_root from the path when the path was . fails.  We now do it by length without the gsub.  Fixes #19