Add a --test option to docgen.py that will run the sphinx build with warning treated as errors.
Extract the travis commands to an external script.
Fix a couple of simple mistakes that would prevent the tests from running correctly.
Change the tests to use the new script and enable the test for the doc building.
Properly escape shell variable and make sure to pass the PART to theano-nose.
Make the script execution explicit.