Travis-CI: add support for rst testing

Since the logic is getting a bit complicated, I created a nice bash script in
the bin/ directory to actually execute the tests, based on the environment
variables that are set by Travis-CI.

Also I now use "[[" in all if statements instead of "[", as that is the
preferred way in bash.