Uninformative error when branch name contains a dot
We were just experimenting with some docs stuff, and @minrk created a branch name with a dot (`.`) in it. Builds on this branch all failed, and the only error message in the logs was "top level build failure". It took us a while to work out that the branch name was the problem.

I don't think it's especially important to allow branch names with dots, but it would be nice to at least get an error that pointed us to the branch name.

diff --git a/readthedocs/builds/models.py b/readthedocs/builds/models.py
index b53a3e361..5214d4340 100644
--- a/readthedocs/builds/models.py
+++ b/readthedocs/builds/models.py
@@ -184,10 +184,10 @@ class Version(models.Model):
         return data
 
     def get_conf_py_path(self):
-        conf_py_path = self.project.conf_file(self.slug)
-        conf_py_path = conf_py_path.replace(
-            self.project.checkout_path(self.slug), '')
-        return conf_py_path.replace('conf.py', '')
+        conf_py_path = self.project.conf_dir(self.slug)
+        checkout_prefix = self.project.checkout_path(self.slug)
+        conf_py_path = os.path.relpath(conf_py_path, checkout_prefix)
+        return conf_py_path
 
     def get_build_path(self):
         '''Return version build path if path exists, otherwise `None`'''
diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py
index 088497783..b59576052 100644
--- a/readthedocs/projects/models.py
+++ b/readthedocs/projects/models.py
@@ -597,7 +597,7 @@ class Project(models.Model):
     def conf_dir(self, version=LATEST):
         conf_file = self.conf_file(version)
         if conf_file:
-            return conf_file.replace('/conf.py', '')
+            return os.path.dirname(conf_file)
 
     @property
     def is_type_sphinx(self):
['readthedocs/builds/models.py', 'readthedocs/projects/models.py']